Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

FTP file into docker container on remote server

How can I transfer transfer files into a Docker container running on a remote Ubuntu server using an FTP client? I can SSH into the server and use docker cp, which works fine. But I have a client who needs to be able to do so with something like FileZilla. Is this possible?

like image 441
rurp Avatar asked Sep 15 '17 17:09

rurp


1 Answers

Im not an expert with docker, but you could try this:

You can expose several ports when you run the container. So, you can expose the FTP port also, something like this.

docker run --name containername -p 3000:80 -p 3001:21 -d dockerimagename

In this example with the -p 3001:21 you are exposing your port 21 of the container to your port 3001 of the Server, so you can enter with filezilla with the ip of your server for host, and 3001 as port.

like image 71
Leonardo Cabré Avatar answered Sep 22 '22 18:09

Leonardo Cabré