WANTED: write up on how to use Docker Compose with Docker 1.12.0's embedded Swarm

I’ve got a handle on how to use the new embedded Swarm capabilities and the use of the docker service command. What I would like to learn is how to make Docker Compose work with the new embedded Swarm. All the information I’ve come across talks about using the legacy Swarm set-up and the two do not seem to be compatible. Can anyone point me to documentation or a working example on how to get Docker Compose to play nice with embedded Swarm?

Thanks,
Ron

I’ll assume your’e talking about launching services on a docker engine in swarm mode (the 1.12.x thing) using docker-compose… You don’t :frowning:

Actually, you use docker-compose bundle to generate a *.dab file (Docker App Bundle), and then use docker deploy (a command only available on Beta if your using Docker for Mac/Windows)

It does make sense to me too to just use docker-compose up -d to deploy the project as a stack in a docker swarm (specially when pointing to engines in the cloud provisioned with docker-machine), so I’m hoping they add this functionality… right now it’s a bit confusing.

You can check docker stack deploy | Docker Docs for the documentation

1 Like

I could almost use the exported bundle via docker deploy - except for one of my Docker images which needed access to the docker API socket. docker-compose bundle drops out the mount needed to get at the docker socket API. This is needed by Jason Wilder’s awesome self-configuring nginx reverse proxy image.

“Experimental” features…

…for now, the only way you can add environment-dependant settings to services deployed from a .dab is by issuing a docker service update command…

I remember reading a discussion pertaining what goes and what shouldn’t go inside the .dab file. Seems like the main goal of the .dab is to describe a stack without the environment specifics… I feel we’re far from a single command to truly deploy a stack with node/engine constraints, special settings, etc.