Expected behavior
Follow the tutorial Getting started with Swarm mode | Docker Docs and use Macs with Docker for Mac
All the steps work
Actual behavior
Following the tutorial I’ve installed Docker 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.
Additional info
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 for Mac, or is that incorrect?