Docker Community Forums

Share and learn in the Docker community.

Docker-machine create swarm not working with token


(Romildo) #1

I am trying to provision a swarm cluster using docker-machine and passing the swarm parameters including tokens but for some reason the swarm never gets initiated which is my understanding what should happen.
Here is the command to create the manager node.
#>docker-machine create -d virtualbox --swarm --swarm-master --swarm-discovery token://31e61710169a7d3568502b0e9fb09d66 master
docker -v
Docker version 1.12.1, build 6f9534c
docker-machine version 0.8.1, build 41b3b25

Once them master is provisioned I ssh into it and run.
$ docker-machine ssh master
root@master:/home/docker# docker node ls
Error response from daemon: This node is not a swarm manager. Use “docker swarm init” or “docker swarm join” to connect this node to swarm and try again.

I assumed that passing the swarm parameter would initialize the cluster. What am I doing wrong??