MENU
2 Initialize a Docker swarm
To use a docker swarm, first initialize one on the primary manager:
docker swarm init

Check that you have indeed initialized the swarm:
docker info


In case there are multiple IPs on your network interface, you will need to specify:
--advertise-addr, the address other nodes in the Docker swarm use to connect to your node, and
--listen-addr, the address that the swarm service listens on for incoming connections.
docker swarm init --advertise-addr 192.168.2.23:2377 --listen-addr 192.168.2.23:2377
You should also make sure the nodes can reach one another, ie. not blocked by firewall.