What are the benefits of Docker Compose over Docker Swarm and Docker Stack?

From what I read, it seems that Docker-Compose is a tool for creating multiple containers on the same host, while Docker Swarm is a tool that can do the same, but with more control and on multiple hosts using Docker Stack. I looked at this tutorial and also looked at this thread:

docker-compose.yml vs docker-stack.yml what's the difference?

And I come to the conclusion that there is no reason to ever use Docker-Compose, when you can use Docker Swarm with Docker Stack. They can even use the same docker-compose.yml file.

It seems that Docker-compose appeared before the swarm and stack, and perhaps the new swarm + stack solution makes it obsolete, but it still remains the same. Is it correct? If not, what are the advantages of Docker-Compose over Docker Swarm and Docker Stack in terms of creating a development or production environment?

+6
source share
2 answers

It seems that Docker-compose appeared before the swarm and stack, and perhaps the new swarm + stack solution makes it obsolete, but it still remains the same. Is it correct?

, . Compose Swarm ( fig). , , (, ) Swarm Mode ( docker).

, , Docker. , Docker Compose Swarm Mode .

, Docker Compose libcompose (https://github.com/docker/libcompose), docker-compose.yml (. Rancher rancher-compose). , libcompose.

, Docker Swarm libcompose. , , Swarm Mode libcompose . , Docker Compose libcompose. , ...

+5

, : Docker Swarm, Docker Compose Docker Newtorks?

Docker Compose - , .

, Docker Compose . , , - db, app web-. , . .


Compose - Docker.

Docker Swarm - , :

  • - (), . .

, "docker run" ( Swarm node). Swarm () .

: Swarm Docker Compose

+3

Source: https://habr.com/ru/post/1017112/


All Articles