

This Docker container implements a vsftpd server, with the following features:
You can download the image with the following command:
docker pull fauria/vsftpd
This image uses environment variables to allow the configuration of some parameteres at run time:
FTP_USERFTP_USER environment variable at run time, admin will be used by default.FTP_PASSFTP_PASS, a 16 characters random string will be automatically generated. You can obtain this value through the container logs.PASV_ADDRESSPASV_MIN_PORTdocker -p parameter.PASV_MAX_PORTThe image exposes ports 20 and 21. Also, exports two volumes: /home/vsftpd, which contains users home directories, and /var/log/vsftpd, used to store logs.
When sharing a homes directory between the host and the container (/home/vsftpd) the owner user id and group id should be 14 and 80 respectively. This correspond ftp user and ftp group on the container, but may match something else on the host.
docker run --rm fauria/vsftpd
docker run -d -p 21:21 -v /my/data/directory:/home/vsftpd --name vsftpd fauria/vsftpd
# see logs for credentials:
docker logs vsftpd
docker run -d -v /my/data/directory:/home/vsftpd \
-p 20:20 -p 21:21 -p 21100-21110:21100-21110 \
-e FTP_USER=myuser -e FTP_PASS=mypass \
-e PASV_ADDRESS=127.0.0.1 -e PASV_MIN_PORT=21100 -e PASV_MAX_PORT=21110 \
--name vsftpd --restart=always fauria/vsftpd
docker exec -i -t vsftpd bash
mkdir /home/vsftpd/myuser
echo -e "myuser\nmypass" >> /etc/vsftpd/virtual_users.txt
/usr/bin/db_load -T -t hash -f /etc/vsftpd/virtual_users.txt /etc/vsftpd/virtual_users.db
exit
docker restart vsftpd
Content type
Image
Digest
Size
134.2 MB
Last updated
over 8 years ago
docker pull alancnet/vsftpd