docker-compose.yml vs docker-stack.yml what difference?

匿名 (未验证) 提交于 2019-12-03 02:56:01

问题:

I am new docker-user. And in difference manuals I have find usually docker-compose.yml file for description docker job, but on docker site for this goal used docker-stack.yml file. What difference?

回答1:

docker-compose.yml is for the docker-compose tool which is for multi container docker applications on a single docker engine.

its called with

docker-compose up 

docker-stack.yml is for the docker swarm tool. (for orchestration and scheduling).

its called with

docker stack 


回答2:

To add to Gabbax0r reply:

Docker Swarm was a standalone component used to cluster Docker engines as a single one.

As of Docker 1.12 the "Swarm" standalone was integrated inside the Docker engine (read the preamble at this page), and Swarm is (or will be) legacy.

To reply to your original question, it is just different names for different cases, but they both are meant to serve the same purpose.

To reply to your comment question, use docker-compose when you have to orchestrate a multi-container app on a single node; if you have to worry about multi-nodes and load-balancing and all this advanced stuff, you better off go with the Swarm.



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!