I've been trying to follow this tutorial: https://docs.docker.com/engine/swarm/swarm-tutorial/
Instead of running it on some real linux hosts or local VMs I want to network a couple of MacBooks running Docker desktop for Mac.
Following the tutorial I've installed Docker desktop for Mac on two machines. In a terminal on the first machine docker swarm create
works and creates a ca hash and id.
Carrying on to the second machine I execute the join command by pasting it from one to the other.
The second machine cannot connect. This is expected since the IP address show in the output is clearly the IP address inside the virtual machine and not an address on my machine. I tried diverting from the tutorial by specifying the address of the local network adaptor but it says it cannot bind to that address. I know all the ports are open and the machine can connect to each other.
So it seems to me I'm fundamentally misunderstanding the aim of the tutorial or how to setup the two Macs so they can communicate. By googling for solutions it seems there are several possibilities for what I need to do:
Run a distributed kv store to help the swarm network coordinate (but isn't this the point of the new orchestration?) Set up a port tunnel on each machine from the network adaptor to the alpine linux docker daemon Give up and just test my cluster locally
Update: after some more research it seems I should create an overlay network using this guide. But this guide uses docker-machine. As far as I understand I should/can not use docker-machine along with Docker desktop for Mac, or is that incorrect?
https://docs.docker.com/engine/userguide/networking/get-started-overlay/
As of Docker 1.12 this is not possible. It may be worked on in a later version.