1. Run containers
docker run -dt --name ftpd_server -p 21:21 -p 30000-30209:30000-30209 -e "PUBLICHOST=localhost" --privileged=true -v /pure-ftpd/wangxiaolei:/home/ftpusers/wangxiaolei stilliard/pure-ftpd:hardened bash
2. Go to the interior of the container
docker exec -it ftpd_server /bin/bash
3.1 Add user userA
pure-pw useradd wangxiaolei -u ftpuser -d / home / ftpusers / wangxiaolei
3.2 Change to the directory / home / ftpusers / userA owner and owner group
chown ftpuser:ftpgroup /home/ftpusers/wangxiaolei
3.3 generating corresponding data record
pure-pw mkdb
3.4 running ftp
/usr/sbin/pure-ftpd -c 100 -C 100 -l puredb:/etc/pure-ftpd/pureftpd.pdb -E -j -R -P $PUBLICHOST -p 30000:30209 &
Description:
-C 100 to: allow simultaneous client connections the number of columns 100
Is -C 100: maximum number of the same IP connection 100
These two values and the port number 30000: 30209 corresponding to the
3.5 Exit container shell
exit