Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

FTP into existing Docker Containers

I'm looking to see if it is possible to somehow FTP into an already existing Docker container? For example, I'm using the dockerfile/ghost in combination with jwilder/nginx-proxy, and once I deploy/build a container, I'd like for the user to be able to FTP into the container running Ghost so they can upload additional files such as themes, stylesheets, etc. What would be the best method in accomplishing this? Thanks in advance!

like image 821
daniel Avatar asked Oct 24 '14 21:10

daniel


1 Answers

You have a few choices:

  • run ftp in the Ghost container and expose a port
  • use a host directory to store the user content and give them FTP to the host (not the best choice)
  • map the same host directory into both the Ghost container and the FTP server container

Personally I thnk the last one is the best and the most work though the advantages will be worth it in the long run. I'm making the assumption that the uploaded content should survive container termination which is why I recommend using a mapped host directory, if this is not the case you can use linked volumes between the FTP container and the Ghost container.

like image 51
Arthur Ulfeldt Avatar answered Sep 23 '22 22:09

Arthur Ulfeldt