Docker Community Forums

Share and learn in the Docker community.

How to deploy container to remote host from a central docker machine?


(Ben Zhou) #1

This is certainly a newbie question:

is there a way to deploy docker image to remote hosts from a central location, say a swarm manager? It seems to me docker machine can provision hosts in the cloud, but container deployment has to be done locally on individual hosts. Is this correct? Or can deployment be done from a central location remotely?


(Nathan Le Claire) #2

I’m not really clear what this question means. What did you have in mind? Running docker service commands has an effect on the entire cluster, that’s why you can only invoke them from manager nodes.


(Ben Zhou) #3

in my experiment with swarm, it seems if I point my CLI to swarm manager, I lose connection to docker daemon. This seems normal as the CLI used to connect to the daemon, which enables me to run docker command. But with CLI now points to swarm manager, which is not a docker daemon, as a result, I can no longer deploy containers.

What do I need to do to be able to run docker command against the swarm manager?