Docker stack deploy in windows

女生的网名这么多〃 提交于 2019-12-02 16:53:00

问题


i have some questions in docker stack windows.

Can we enable docker stack in windows 2016. Is it fully supported.

if yes, how can we enable. how we can automate creating swarm cluster using this file. i have searched google but can't find related to windows. please provide me If you have any links to study.


回答1:


Docker stack is somehow the equivalent for docker-compose but in swarm. A stack is a composition of multiple services defined in a stack file. You deploy a stack on a docker swarm which results in the creation of multiple services in that swarm.

You need first to have a swarm created by running docker swarm init and then you deploy the stack to the swarm by running docker stack deploy --compose-file stack-file.yml <stack-name>. Note that the same docker compose file you use, can be used to deploy the containers in swarm mode.



来源:https://stackoverflow.com/questions/46102119/docker-stack-deploy-in-windows

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