This description is quick-and-dirty.
This Proftpd image allows some broad configuration via environments, including:
It has a few volumes:
Environment variables:
PROFTPD_FTP_PORT="21" - The FTP port proftpd listens on inside the containerPROFTPD_PASSIVE_PORTS="49200-49230" - Port range for passive FTP. You'll need to map these ports directly on the host, e.g. docker run -p 49200-49230:49200-49230 -d bluefoxicy/proftpdPROFTPD_DEBUG_LEVEL="1" - Logging levelPROFTPD_SERVER_NAME="Proftpd" - Server namePROFTPD_REQUIRE_VALID_SHELL="off" - Controls whether users with a valid shell can log in. Should be off.PROFTPD_TIMEOUT_NO_TRANSFER="600" - TimeoutNoTransfer settingPROFTPD_TIMEOUT_STALLED="600" - TimeoutStalled settingPROFTPD_TIMEOUT_IDLE="600" - TimeoutIdlePROFTPD_DEFAULT_ROOT="~" - mod_vroot DefaultRoot settingPROFTPD_MAX_INSTANCES="300" - MaxInstances. Total number of proftpd processes allowed to spawn.PROFTPD_UMASK="022 022" - umask directivePROFTPD_AUTH_ORDER="mod_auth_pam.c* mod_auth_unix.c" - AuthOrder directivePROFTPD_TLS="off" - Enables or disables TLS. You must provide a TLS certificate, key, and chain (chain can be empty), e.g. by docker run -v /etc/ssl/certs/example.com.crt:/etc/ssl/certs/proftpd.crt:ro and so forth. Certificates are /etc/ssl/certs/proftpd.crt, /etc/ssl/certs/chain.crt, and /etc/proftpd/private/proftpd.key.PROFTPD_TLS_REQUIRED="off" - Controls if clients can connect without TLSBe sure to drop unnecessary capabilities in your docker-compose.yml. The below example works well; whereas setgid and setuid are required capabilities and cannot be dropped.
# Launch proftpd
ftp:
image: bluefoxicy/proftpd
cap_drop:
- net_raw
- mknod
- setpcap
- setfcap
- fowner
- dac_override
environment:
PROFTPD_PASSIVE_PORTS: "50000-50030"
PROFTPD_TLS: on
PROFTPD_AUTH_ORDER: "mod_auth_file.c"
ports:
- "21:21"
- "50000-50030:50000-50030"
volumes:
# FTP directory
- /var/ftp/site1/files/:/var/ftp
# Configuration
- /var/ftp/site1/config/auth.d/:/etc/proftpd/auth.d/
- /var/ftp/site1/config/conf.d/:/etc/proftpd/conf.d/
# keeping user.d/authfile/passwd and user.d/authfile/group
- /var/ftp/site1/config/user.d/:/etc/proftpd/user.d/
# ssl certificates
- /etc/ssl/certs/example.com.crt:/etc/ssl/certs/proftpd.crt:ro
- /etc/ssl/certs/example.com.chain.crt:/etc/ssl/certs/chain.crt:ro
- /etc/ssl/private/example.com.key:/etc/ssl/private/proftpd.key:ro
For winbind, configure winbind on your host system, then add the following volumes:
volumes:
# Winbind
- /var/run/samba/winbindd/:/var/run/samba/winbindd/:ro
- /var/lib/samba/winbindd_privileged/:/var/lib/samba/winbindd_privileged/:ro
- /etc/nsswitch.conf:/etc/nsswitch.conf:ro
Your configuration should use mod_auth_pam.c and mod_auth_unix.c with PersistentPassword set to off.
Content type
Image
Digest
sha256:aedacdbaa…
Size
52.7 MB
Last updated
over 8 years ago
docker pull bluefoxicy/proftpd