February 2019
Intermediate to advanced
240 pages
5h 25m
English
It’s time to dive deeper into Swarm and start getting our hands dirty.
Previously, we created a plain-vanilla Docker instance: local-vm-1. To turn our instance into a swarm, we have to initialize it explicitly. With our CLI targeting our new instance, we can do this by running:
| | $ docker swarm init --advertise-addr <IP address of instance> |
where <IP address of instance>, in our case, is local-vm-1’s public IP address. We can easily find that out by rerunning:
| | $ docker-machine ls |
| | NAME … … … URL … … … |
| | local-vm-1 * … … tcp://192.168.99.100:2376 … |
The IP address of the instance is listed in the “URL” column. For me, the IP address is 192.168.99.100, but yours will differ. ...