
This Docker image is inpired by 3 other Docker images to merge all their fonctionalities in one unique image:
This Docker container provides a vsftpd server, with the following features:
pasv_address on a network interfaceComming soon:
It's pretty simple to build the image from source thanks to the Makefile.
$ make build
Run the container:
$ docker run --rm -it --name vsftpd -p 20-22:20-22 -p 21100-21110:21100-21110 -p 990:990 lhauspie/vsftpd-alpine
Connect to the FTP server from the host machine:
$ ftp -p localhost 21
Connect to the FTP server from another container:
$ docker run -it --rm --link vsftpd centos:7 bash
$ yum install ftp
$ ftp -p vsftpd 21
All the following environment variables have to be specified as docker environment variable like :
docker run -e ENV_VAR=env_val vsftpd-alpine
For more information, please refer to docker env variables
FTP_USERUsername for the default FTP account.
Default value: user
Accepted values: Any string. Avoid whitespaces and special chars.
FTP_PASSThis is the password of the default FTP account.
Default value: pass
Accepted values: Any string. Avoid whitespaces and special chars.
FTP_MODEAllow you to choose which ftp configuration you want to use.
Default value: ftp
Accepted values: < ftp | ftps | ftps_implicit | ftps_tls >
Note that in case of using ftps_implicit you must expose the port 990.
So don't forget to expose your ports with docker -p parameter.
PASV_ENABLEAllow you to enable/disable the passive mode of the FTP server.
Default value: YES
Accepted values: < NO | YES >
PASV_ADDRESSThis is the address sent by the FTP server to the client during a passive mode connection. If you choose to set this variable with a hostname, just be sure that this hostname is known by the docker container.
Default value: < EMPTY STRING >
Accepted values: Any IPv4 address or Hostname (see PASV_ADDR_RESOLVE).
PASV_ADDRESS_INTERFACEAllow you to extract the IP address of a network interface to set the PASV_ADDRESS dynamically.
Usefull when you want to connect to the FTP server from Host machine or from another container.
Default value: eth0
Accepted values: Any IPv4 address or Hostname (see PASV_ADDRESS_RESOLVE).
PASV_ADDRESS_INTERFACE has no effect as soon as PASV_ADDRESS is set.
So the following command will set the pasv_address option to the IP of the container (network interface eth0):
$ docker run --rm -it --name vsftpd -e PASV_ADDRESS_INTERFACE=eth0 -p 21:21 -p 21100-21110:21100-21110 lhauspie/vsftpd-alpine
While the following command will set the pasv_address to foobar:
$ docker run --rm -it --name vsftpd -e PASV_ADDRESS=foobar -e PASV_ADDRESS_INTERFACE=eth0 -p 21:21 -p 21100-21110:21100-21110 lhauspie/vsftpd-alpine
PASV_ADDR_RESOLVESet to YES if you want to use a hostname (as opposed to IP address) in the PASV_ADDRESS env variable.
Default value: NO
Accepted values: < NO | YES >
To use the PASV_ADDR_RESOLVE env variable, you have to specify the --hostname docker run option with the same value as the env variable:
$ docker run --rm -it --hostname vsftpd --name vsftpd -e PASV_ADDRESS=vsftpd -e PASV_ADDR_RESOLVE=YES -p 21:21 -p 21100-21110:21100-21110 lhauspie/vsftpd-alpine
PASV_MIN_PORTThis will be used as the lower bound of the passive mode port range.
Don't forget to expose your ports with docker -p parameter.
Default value: 21100
Accepted values: Any valid port number
PASV_MAX_PORTThis will be used as the upper bound of the passive mode port range.
Don't forget to expose your ports with docker -p parameter.
Default value: 21110
Accepted values: Any valid port number
Content type
Image
Digest
Size
7.6 MB
Last updated
almost 5 years ago
docker pull lhauspie/vsftpd-alpine