Install FTP server using Docker

I have shown you how to install FTP server on Ubuntu. In this tutorial, I will guide you to install FTP server using Docker!

We will be using vsftpd Docker Image at Docker Hub https://hub.docker.com/r/fauria/vsftpd/.

This Docker Image exposes many different environment variables so that we can configure the FTP server the way we want, including:

  • FTP_USER
  • FTP_PASS
  • PASV_ADDRESS
  • PASV_ADDR_RESOLVE
  • PASV_ENABLE
  • PASV_MIN_PORT
  • PASV_MAX_PORT
  • XFERLOG_STD_FORMAT
  • LOG_STDOUT
  • FILE_OPEN_MODE
  • LOCAL_UMASK
  • REVERSE_LOOKUP_ENABLE
  • PASV_PROMISCUOUS
  • PORT_PROMISCUOUS

Details of the meaning of each environment variable, you can read more here.

I will use the default value for these environment variables, so I just need to run the following command to be able to start an FTP server:

and:

I map the directory on my machine with the directory /home/vsftpd so that we can easily work with data on this FTP server.

Result:

As you can see, after running the docker run command, I also run one more command, docker logs, to see the default information that this Docker Image initializes when running Docker Container from it. You can use the username and password information shown here to log in and work with the FTP server!

Add Comment