To simulate how to edit the Docker Daemon we'll launch a new daemon. The command below starts a new Docker 1.10 daemon.
The cluster-store parameter tells Docker where the Consul is running and the port. Docker uses Consul to register itself and discover other accessible Docker hosts.
The cluster-advertise is the IP address to register for this Docker instance. This is the IP address that Consul provides to other Docker daemons. In most cases this will be the Host's IP address. :0 advertises all ports.
docker run --privileged --name d1 -d \
--net=host katacoda/dind:1.10 -H 0.0.0.0:3375 \
--cluster-store=consul://[[HOST_IP]]:8500 \
--cluster-advertise=[[HOST_IP]]:0
Talk to the new Docker Daemon
To communicate with the launched daemon we can update our DOCKERHOST or define an alias and providing the host via -H_ parameter.
export DOCKER_HOST="[[HOST_IP]]:3375"
docker run --privileged --name d1 -d \
--net=host katacoda/dind:1.10 -H 0.0.0.0:3375 \
--cluster-store=consul://[[HOST_IP]]:8500 \
--cluster-advertise=[[HOST_IP]]:0
export DOCKER_HOST=[[HOST_IP]]:3375"
docker info