Pure-ftpd server running as localhost with a default user test
100K+
https://github.com/onekilo79/ftpd_test
A simple Docker image with a predefined test user, based on a simple extension of Andrew Stilliard's Pure FTPd image
This also uses ideas from Chris Pitt's pure ftp image
This is a local developers image to use a ftp server for development and testing in isolation.
It is not a intended to run this image as infrastructure.
The image from stillard would start up a server with a public host of ftp.foo.com by default. This means it thinks its own public address is ftp.foo.com.
When your run stillards image you have to remember to override the value PUBLICHOST every time you create the container else it will never work locally as localhost.
E.G. from Stillard's instructions:
docker run -d --name ftpd_server -p 21:21 -p 30000-30009:30000-30009 -e "PUBLICHOST=localhost" stilliard/pure-ftpd:hardened
Where -e "PUBLICHOST=localhost" has to be changed each and every time to run as localhost
This version the server will run up expecting itself to be localhost and repsect commands to/from localhost so you can use this locally.
Pull the image from Docker Hub using
docker pull onekilo79/ftpd_test
Running the following will create a file under a directory locally. I have chosen to use the directory /tmp/ftp/
When the ftp server is created it will use /tmp/ftp as the start of its own file system.
The user test will have a home folder that external to the ftp server will be /tmp/ftp/ftpusers/test/
Creating a file under /tmp/ftp/ftpusers/test/ will allow you to see it when you log into the ftp server at test
mkdir -p /tmp/ftp/ftpusers/test/
touch /tmp/ftp/ftpusers/test/this_working_oh_hai.txt
docker run -d --name ftpd_server -p 21:21 -p 30000-30009:30000-30009 -v /tmp/ftp:/hostmount onekilo79/ftpd_test
docker run -d
--name ftpd_server
-p 21:21
-p 30000-30009:30000-30009
-v /tmp/ftp:/hostmount
onekilo79/ftpd_test
You can log into the server via:
ftp ftp://test:test@localhost
ls
Your date will be different but you should see the file this_working_oh_hai.txt
-rw-r--r-- 1 1000 ftpgroup 0 Oct 22 17:46 this_working_oh_hai.txt
Content type
Image
Digest
Size
174.6 MB
Last updated
almost 10 years ago
docker pull onekilo79/ftpd_test