1

I used to create multiple node on docker-swarm with virtual toolbox. So each node corresponded to creating a new virtual machine. This way each virtual machine had separate IP.

Now, docker toolbox is deprecated. I am trying to learn about docker-swarm and want to create multiple nodes/hosts.

How can i create multiple node/hosts with docker desktop for windows?

Khan Saab
  • 434
  • 1
  • 8
  • 20
  • That depends on your container needs. Do you need to run Windows containers, Linux containers, or both? – jrbe228 Sep 04 '21 at 16:14

2 Answers2

0

I wouldn't spend time trying to configure multi-node Swarm with only Docker Desktop. Just use a Linux manager node + Windows worker nodes (which can each run Docker Desktop without complicating the Swarm management set up). Full steps listed here for creating an example Swarm cluster in this format: https://stackoverflow.com/a/69058087/7991646

jrbe228
  • 356
  • 3
  • 11
-1

What (i think) you are looking for is actually a well defined .yaml file whit all your services and ports where they should listen.

Check the example here, it should clarify a bit how you should create the hosts in docker-swarm https://docs.docker.com/engine/swarm/stack-deploy/

In this other file, you can see a more realistic .yaml with replicas value set. It regulates how many hosts you should have per service https://github.com/dockersamples/example-voting-app/blob/master/docker-stack.yml

Marco Massetti
  • 539
  • 4
  • 12