Docker堆栈在Windows中部署

Docker堆栈在Windows中部署

本文介绍了Docker堆栈在Windows中部署的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Docker堆栈窗口中有一些问题。

i have some questions in docker stack windows.

我们可以在Windows 2016中启用Docker堆栈吗?是否完全受支持。

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

如果是,我们如何启用。我们如何使用该文件自动创建群集集群。
我已经搜索过Google,但是找不到与Windows相关的信息。如果您有任何学习链接,请提供给我。

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.

推荐答案

Docker堆栈在某种程度上与docker-compose等效,但在swarm中。堆栈是在堆栈文件中定义的多个服务的组合。您将堆栈部署在Docker集群上,从而在该集群中创建了多个服务。

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.

首先需要通过运行 docker swarm init ,然后运行 docker stack deploy --compose-file stack-file.yml< stack-name> 。请注意,可以使用与您使用的相同的docker compose文件以群集模式部署容器。

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.

这篇关于Docker堆栈在Windows中部署的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-07 08:25