Does compose support new Docker swarm mode?
I think you should clarify your question.
Here's how swarm mode works:
I think you should follow this tutorial: https://docs.docker.com/engine/swarm/swarm-tutorial/
Then read this: https://docs.docker.com/compose/swarm/
And this: https://docs.docker.com/compose/bundles/
Then come back and explain what you want to do.
I will answer for @vingrad, because I guess I ran into the same issue as him.
The second link (https://docs.docker.com/compose/swarm/) applies to classic KV-store dependant swarm. It won't work with new swarm mode.
The only way to create a new swarm mode style stack from a compose-file is to go the bundle way. Unfortunately, bundles are not available with Docker 1.12, you have to run an experimental build.
On top of that, bundles are usefull for production environments, but not very convenient for development.
So I guess the real question is:
Is compose going to support running compose files on new swarm-mode clusters?
For the record, with docker 1.12 and compose 1.8, here is the result:
$ docker-compose up -d
WARNING: The Docker Engine you're using is running in swarm mode.
Compose does not use swarm mode to deploy services to multiple nodes in a swarm. All containers will be scheduled on the current node.
To deploy your application across the swarm, use the bundle feature of the Docker experimental build.
More info:
https://docs.docker.com/compose/bundles
@hervenicol thanks!
Close then?
The swarm confusion is actually covered by #3804
Yet, no answer to the question:
Is compose going to support running compose files on new swarm-mode clusters?
…
Difficult to see. Always in motion is the future...
I agree with @hervenicol and @vingrad that this question wasn't answered. I am not sure why @Vanuan closed this question. It would be good to see it included in the roadmap for Compose and keep this issue open until there is support for Docker Engine Swarm Mode with Docker Compose.
Thanks @testphreak . However since when I wrote my last comment here, the following Docker issue appeared: https://github.com/docker/docker/issues/26876
If you read it, you can find a few clues on the future of Compose. I guess this is still WIP though.
Thanks for pointing me to the conversation @hervenicol!
@vingrad @hervenicol guess you should also check this one: #776
So, in short words, will not work that smoothly as ppl expect, especially the integration with docker-compose, just wasted tons of time here.
Most helpful comment
I will answer for @vingrad, because I guess I ran into the same issue as him.
The second link (https://docs.docker.com/compose/swarm/) applies to classic KV-store dependant swarm. It won't work with new swarm mode.
The only way to create a new swarm mode style stack from a compose-file is to go the bundle way. Unfortunately, bundles are not available with Docker 1.12, you have to run an experimental build.
On top of that, bundles are usefull for production environments, but not very convenient for development.
So I guess the real question is:
Is compose going to support running compose files on new swarm-mode clusters?
For the record, with docker 1.12 and compose 1.8, here is the result: