I am new to swarm, and I am trying to get a simple service set up locally. I have set up swarm discovery with consul like this:
docker-machine create -d virtualbox consul eval $(docker-machine env consul) docker run -d -p 8500:8500 -h consul progrium/consul -server -bootstrap docker-machine create -d virtualbox --swarm --swarm-master --swarm-discovery="consul://$(docker-machine ip consul):8500" --engine-opt="cluster-store=consul://$(docker-machine ip consul):8500" --engine-opt="cluster-advertise=eth1:2376" swarm-master docker-machine create -d virtualbox --swarm --swarm-discovery="consul://$(docker-machine ip consul):8500" --engine-opt="cluster-store=consul://$(docker-machine ip consul):8500" --engine-opt="cluster-advertise=eth1:2376" swarm-worker eval $(docker-machine env --swarm swarm-master)
This is all lovely, and I get the following output from docker info
Nodes: 2
swarm-master: 192.168.99.115:2376
└ ID: XRXA:2QIV:OZFX:4K3N:UF37:OWTO:TV4X:5SSE:QBGI:WDX2:ZLQS:QD7Q
└ Status: Healthy
└ Containers: 2 (2 Running, 0 Paused, 0 Stopped)
└ Reserved CPUs: 0 / 1
└ Reserved Memory: 0 B / 1.021 GiB
└ Labels: kernelversion=4.4.17-boot2docker, operatingsystem=Boot2Docker 1.12.1 (TCL 7.2); HEAD : ef7d0b4 - Thu Aug 18 21:18:06 UTC 2016, provider=virtualbox, storagedriver=aufs
└ UpdatedAt: 2016-08-29T21:10:51Z
└ ServerVersion: 1.12.1
swarm-worker: 192.168.99.116:2376
└ ID: BLNZ:TUGW:T4QQ:AUWZ:J7U3:JJTR:GHN2:SLCU:ZGRL:JGMM:LVOI:32DK
└ Status: Healthy
└ Containers: 1 (1 Running, 0 Paused, 0 Stopped)
└ Reserved CPUs: 0 / 1
└ Reserved Memory: 0 B / 1.021 GiB
└ Labels: kernelversion=4.4.17-boot2docker, operatingsystem=Boot2Docker 1.12.1 (TCL 7.2); HEAD : ef7d0b4 - Thu Aug 18 21:18:06 UTC 2016, provider=virtualbox, storagedriver=aufs
└ UpdatedAt: 2016-08-29T21:10:43Z
└ ServerVersion: 1.12.1
Hooray! And I can successfully create an overlay network
docker network create --driver overlay --subnet=10.0.9.0/24 my-network
docker network ls
NETWORK ID NAME DRIVER SCOPE
809a82c5c70d my-network overlay global
All is great! Now for the important part:
docker service create --replicas 1 --name my-web --network my-network nginx
Error response from daemon: 404 page not found
ACK! I have tried both the latest stable version of docker (1.12.0) and the latest beta version of docker (1.12.1-beta24) but I keep getting hit with this error. What have I done wrong?
OS X 10.11.6
Virtualbox 5.1.4
Steps taken from Manage swarm service networks | Docker Docs