一、启动容器
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/