An easy-to-use, tiny yet full-featured installation of ProFTPD.
100K+
An easy-to-use, tiny yet full-featured installation of ProFTPD.
The most-common directives can be specified in environment variables as shown below. One is required, the PASV_ADDRESS. If you need further customizations, put them in one or more files under mount points /etc/proftpd.d and /etc/proftpd/modules.d. In case SFTP is enabled, it is important to create a persistent volume to be mounted in /etc/ssh, to avoid generating SSH keys each time a container is created.
A single upload user can be specified via the FTPUSER_xxx variables. It is activated by defining ftp-user-password-secret thus:
python -c "import crypt,random,string; \
print crypt.crypt('YOURPASSWORD', '\$6\$' + ''.join( \
[random.choice(string.ascii_letters + string.digits) \
for _ in range(16)]))" | \
docker secret create ftp-user-password-secret -
An example compose file is provided here in docker-compose.yml. This is for the common scenario of sharing from Docker swarm the contents of a network-attached volume as a read-only anonymous-ftp service. This repo has complete instructions for building a kubernetes cluster where you can launch with helm or kubernetes.yaml using make and customizing Makefile.vars after cloning this repo:
git clone https://github.com/instantlinux/docker-tools.git
cd docker-tools/k8s
make proftpd
These variables can be passed to the image from kubernetes.yaml or docker-compose.yml as needed:
| Variable | Default | Description |
|---|---|---|
| ALLOW_OVERWRITE | on | allow clients to modify files |
| ANONYMOUS_DISABLE | off | anonymous login |
| ANON_UPLOAD_ENABLE | DenyAll | anonymous upload |
| FTPUSER_NAME | ftpuser | upload username |
| FTPUSER_SECRETNAME | ftp-user-password-secret | name of hashed pw secret |
| FTPUSER_UID | 1001 | upload file ownership UID |
| LOCAL_UMASK | 022 | upload umask |
| MAX_CLIENTS | 10 | maximum simultaneous logins |
| MAX_INSTANCES | 30 | process limit |
| PASV_ADDRESS | required--address of docker engine | |
| PASV_MAX_PORT | 30100 | range of client ports (rebuild image if changed) |
| PASV_MIN_PORT | 30091 | |
| SFTP_ENABLE | off | use sftp instead of ftp |
| SFTP_PORT | 2222 | sftp port |
| TIMES_GMT | off | local time for directory listing |
| TZ | UTC | local timezone |
| WRITE_ENABLE | AllowAll | allow put/rm |
| Secret | Description |
|---|---|
| ftp-user-password-secret | (optional) hashed pw of upload user |
Networking this within Kubernetes is a bit tricky. The helm chart included here can deploy to a cluster but you need to decide how to assign the PASV_ADDRESS:
server.proftpd=allow on a single worker node -- which means when that node goes down, so does proftpdI tried to make proftpd work with haproxy on multiple k8s nodes but none of the online suggestions work.
If you want to make improvements to this image, see CONTRIBUTING.
Content type
Image
Digest
sha256:72264c297…
Size
6.4 MB
Last updated
about 20 hours ago
docker pull instantlinux/proftpd