- Notifications
You must be signed in to change notification settings - Fork1
Docker image for running vsftpd in a container using virtual users and persisting user config + data in external volumes
License
phantom-artist/vsftpd
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Docker image for running a vsftpd container using virtual users, based on the excellent work atfauria / docker-vsftpdCheck that solution for a detailed list of settings that can be applied to this image at runtime.
The main differences are that this solution attempts to build on docker-vsftpd to allow permanent storage of users / data on volumes which persists across the lifecycle of the container.
SECURITY WARNING: FTP is not a secure protocol and 'crypt' is not a secure function by today's standards. If you want robust security around your users and data, do not use vsftpd and opt for a sftp-based solution where strong encryption and key-based authentication can be implemented.
This is definitely a "use-at-your-own-risk" solution, primarily done as an exercise, and I accept no liability for the security of your data if you implement this solution :)
docker build -t my-ftp .
docker run -d --name my-ftp \-p8020:20 \-p8021:21 \-p 21100-21110:21100-21110 \-e PASV_MIN_PORT=21100 \-e PASV_MAX_PORT=21110 \-e PASV_ADDRESS=< host IP > \-v /path/to/volume/users:/etc/vsftpd/db \-v /path/to/volume/log:/var/log/vsftpd \-v /path/to/volume/data:/home/vsftpd \my-ftp
docker exec -ti my-ftp /bin/bash
addftpuser.sh
docker exec -ti my-ftp /bin/bash
modftpuser.sh
docker exec -ti my-ftp /bin/bash
delftpuser.sh
docker exec -ti my-ftp /bin/bash
delftpdata.sh
ftp host-running-the-container 8021