Docker image for Pure-FTPd.
With a single user :
docker run -d \
-e PUREFTP_PASSIVE_IP=XXX.X.XX.X\
-p 21:21 -p 40000-40009:40000-40009\
-e PUREFTP_USER=user -e PUREFTP_PASSWORD=pass\
bamarni/pureftp
PUREFTP_PASSIVE_IP has to be the IP address of the machine running the container, it can also be its domain name.
If you want to expose an existing directory from your machine, you can use a volume :
docker run -d \
-e PUREFTP_PASSIVE_IP=XXX.X.XX.X\
-p 21:21 -p 40000-40009:40000-40009\
-v /path/in/host:/home/ftpuser/bob -e PUREFTP_BOB_PASSWORD=bobpass\
-e PUREFTP_UID=$(id -u) -e PUREFTP_GID=$(id -g)
bamarni/pureftp
Here, the user will be guessed based on the directory name under /home/ftpuser (bob). The environment variable
for the password is PUREFTP_(USERNAME)_PASSWORD. This allow to have multiple users.
When mounting directories, you should be careful about user mapping, more information here.
To allow FTP over TLS, you can provide a certificate.
The first solution is to create a self-signed certificate, you can provide the certificate subject like this :
docker run -d \
-e PUREFTP_PASSIVE_IP=example.org\
-p 21:21 -p 40000-40009:40000-40009\
-e PUREFTP_CERT_SUBJ="/C=FR/O=My company/CN=example.org"\
-e PUREFTP_USER=user -e PUREFTP_PASSWORD=pass\
bamarni/pureftp
You can instead mount a certificate from the host :
docker run -d \
-e PUREFTP_PASSIVE_IP=example.org\
-p 21:21 -p 40000-40009:40000-40009\
-v /path/to/host/certificate:/etc/ssl/private/pure-ftpd.pem\
-e PUREFTP_USER=user -e PUREFTP_PASSWORD=pass\
bamarni/pureftp
Content type
Image
Digest
Size
123.5 MB
Last updated
over 8 years ago
docker pull bamarni/pureftp