参考地址:https://juejin.im/post/6844903943122714637
https://blog.csdn.net/zd18423418323/article/details/83513968
# 会根据用户映射创建对应的目录
docker run -d \
-v /data/vsftpd:/home/vsftpd \
-p 20:20 \
-p 21:21 \
-p 21100-21110:21100-21110 \
-e FTP_USER=ftppincheng \
-e FTP_PASS=pingchengftp \
-e PASV_ADDRESS=192.168.11.63 \
-e PASV_MIN_PORT=21100 \
-e PASV_MAX_PORT=21100 \
--name pincheng_vsftpd \
--restart=always \
fauria/vsftpd
参考地址 https://my.oschina.net/u/4415401/blog/3324760
https://busyrat.github.io/blog/op/docker/%E5%88%A9%E7%94%A8docker%E6%90%AD%E5%BB%BAftp%E6%9C%8D%E5%8A%A1%E5%99%A8.html#%E9%85%8D%E7%BD%AE%E5%B9%B6%E8%BF%90%E8%A1%8Cftp%E6%9C%8D%E5%8A%A1
#直接映射目录
docker run -d --name ftpd_server \
-p 20-21:20-21 \
-p 30000-30009:30000-30009 \
-v /data/ftp/conf:/etc/pure-ftpd/passwd \
-v /data/nginx/html:/home/ftpusers/www \
-v /data/ftp/data:/home/ftp \
-e FTP_USER_NAME=pincheng \
-e FTP_USER_PASS=SHEJI2020 \
-e "PUBLICHOST=localhost" \
stilliard/pure-ftpd \
/bin/bash -c "useradd pincheng;usermod -d /home/ftp ftp;/run.sh -c 100 -C 10 -l puredb:/etc/pure-ftpd/pureftpd.pdb -j -i -R -P 101.37.246.178 -p 30000:30009"
docker run -d --name ftpd_server \
-p 20-21:20-21 \
-p 30000-30009:30000-30009 \
-v /data/nginx/html:/home/pincheng/www \
-e FTP_USER_NAME=pincheng \
-e FTP_USER_PASS=SHEJI2020 \
-e FTP_USER_HOME=/home/pincheng/www \
-e "PUBLICHOST=101.37.246.178" \
stilliard/pure-ftpd