一、启动容器
docker-compose.yaml
version: '3'
services:
ftp:
restart: always
image: fauria/vsftpd:latest
container_name: ftp
privileged: true
ports:
- '20:20'
- '21:21'
- '21100-21110:21100-21110'
volumes:
- "./data:/home/vsftpd"
environment:
FTP_USER: admin
FTP_PASS: 123456
PASV_ADDRESS: 192.168.17.101
PASV_MIN_PORT: 21100
PASV_MAX_PORT: 21110
# 启动
docker-compose up -d && docker-compose logs -f
# 连接
ftp://192.168.17.101/
作者(Author):小强崽
来源(Source):https://www.wuduoqiang.com/archives/Docker搭建FTP文件服务器
协议(License):署名-非商业性使用-相同方式共享 4.0 国际 (CC BY-NC-SA 4.0)
版权(Copyright):商业转载请联系作者获得授权,非商业转载请注明出处。 For commercial use, please contact the author for authorization. For non-commercial use, please indicate the source.