docker/pure-ftpd/docker-compose.yml
2019-06-27 16:20:41 +08:00

29 lines
995 B
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

version: '2'
services:
ftpd:
image: registry.cn-hangzhou.aliyuncs.com/kennylee/pure-ftpd:stretch-latest
container_name: "ftpd_server"
ports:
- "30000-30059:30000-30059"
- "21:21"
volumes:
- ./data/files/:/home/ftpusers/
- ./data/pure-ftpd/passwd:/etc/pure-ftpd/passwd
environment:
# 注意修改.env中的PUBLICHOST变量为服务器外网地址默认是docker私有网络IP不然被动模式无法使用
PUBLICHOST: ${PUBLICHOST}
FTP_USER_NAME: ${FTP_USER_NAME}
FTP_USER_PASS: ${FTP_USER_PASS}
FTP_USER_HOME: /home/ftpusers/${FTP_USER_NAME}
FTP_MAX_CLIENTS: 30
FTP_MAX_CONNECTIONS: 10
ADDED_FLAGS: "-p 30000:30059 -9 utf8"
restart: on-failure
logging:
driver: 'json-file'
options:
max-size: '12m'
max-file: '5'