Docker Community Forums

Share and learn in the Docker community.

How to use 'docker stack deploy' in my remote client?


(Namsulee) #1

I wonder how to use ‘docker stack deploy’ from remote client.
In my environment of docker, there is space to share from host and save yml file from a specific container. Also, the container can request docker engine remote api using DOCKER_HOST value(tcp). But there is no way to call ‘docker stack deploy’ it opens only for docker cli.
Is there a way to use the docker stack command from remote client?
I think, there is a few way to tackle.

  1. using docker client which should be seen from container
  2. parsing yml in container and judge what server it has and call ‘create service remote api’

and what else?


(Thechane) #2

I too am seeking how to deploy a stack through the API, at the moment it seems that is only possible to create and update individual services via the API. Maybe that will change in the upcoming releases…?


(Bradimqs) #3

I’m also needing this desperately. At the moment you have ssh onto the swarm master, get the latest version of the stack compose file there (via scp or git pull), and then issue a command. That’s just a crazy way to expect people to deploy/update numerous stacks on a swarm.