This Docker container implements a vsftpd server, with the following features:
You can download the image with the following command:
docker pull infrascielo/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.The image exposes ports 20 and 21, along with the range 21100 - 21110 for passive mode. 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 infrascielo/vsftp
docker run -d -p 21:21 -v /my/data/directory:/home/vsftpd --name vsftpd infrascielo/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 \
--name vsftpd infrascielo/vsftpd
docker run -d -v /my/data/directory:/home/vsftpd \
-v /my/database/diretory:/etc/vsftpd/db_user \
-p 21:21 \
-e FTP_USER=myuser -e FTP_PASS=mypass \
--name vsftpd infrascielo/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
131.8 MB
Last updated
about 10 years ago
docker pull infrascielo/vsftpd