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?
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
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
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.