

/home/ftpusers/ The ftp's data volume (by convention).It's recommended to use them in production. There are a few spots onto which you can mount a docker volume to configure the This is for PASV support, please see: #5 PASV not fun :) p 30000:30009 # PASV port range (10 ports for 5 max clients)įor more information please see man pure-ftpd, or visit: Why so many ports opened? P $PUBLICHOST # IP/Host setting for PASV support, passed in your the PUBLICHOST env var R # -nochmod (prevent usage of the CHMOD command) j # -createhomedir (auto create home directory if it doesnt already exist) l puredb:/etc/pure-ftpd/pureftpd.pdb # -login (login file for virtual users) C 5 # -maxclientsperip (no more than 5 requests from the same ip) c 5 # -maxclientsnumber (no more than 5 people at once) usr/sbin/pure-ftpd # path to pure-ftpd executable bob with chroot access only to /home/ftpusers/bob Example usage once insideĬreate an ftp user: e.g. You may need the -expose= option, because default passive ports exposed are 30000 to 30009. If you wish to set the UID & GID of the FTP user, use the FTP_USER_UID & FTP_USER_GID environment variables. To create a user on the ftp container, use the following environment variables: FTP_USER_NAME, FTP_USER_PASS and FTP_USER_HOME.įTP_USER_HOME is the root directory of the new user.ĭocker run -e FTP_USER_NAME=bob -e FTP_USER_PASS=12345 -e FTP_USER_HOME=/home/bob stilliard/pure-ftpd e "ADDED_FLAGS=-tls=2" Operating itĭocker exec -it ftpd_server /bin/bash Setting runtime FTP user You can also pass ADDED_FLAGS as an env variable to add additional options such as -tls to the pure-ftpd command.Į.g. Or for your own image, replace stilliard/pure-ftpd with the name you built it with, e.g.

, where my-pure-ftp is the name you want to build asĭocker run -d -name ftpd_server -p 21:21 -p 30000-30009:30000-30009 -e "PUBLICHOST=localhost" stilliard/pure-ftpd Then you can build your own image, docker build -rm -t my-pure-ftp. you could change the defult command run:ĬMD /run.sh -c 30 -C 10 -l puredb:/etc/pure-ftpd/pureftpd.pdb -E -j -R -P $PUBLICHOST -p 30000:30059
