Creating the cluster

Commands

docker swarm init
docker swarm join --token XXX 1.1.1.1:2377
docker node promote node2
docker swarm join-token manager

Creating nodes with docker-machine

Leaving the swarm