Docker containers don’t support multicast, at least not easily. I find that a bummer.
It’s unclear why not. Well, the most immediate reason is that the networking interfaces they create for the containers don’t have the necessary flag to enable multicast. That, at least according to the issue, is because that’s how Linux defaulted these interfaces. Why did they did they do that?
This means that any number of P2P or (masterless) solutions don’t work. For example zeroconf/mdns is out. I guess this explains the handful of custom service discovery tools. Reinventing the wheel.
In other news… Once you have Boot2Docker setup you need to tell the docker command were the docker daemon is listening for instructions. You do that with the -H switch to docker, or via the DOCKER_HOST environment variable. Typically you’d do:
export DOCKER_HOST=tcp://192.168.59.103:2375
But if your feeling fastidious you might want to ask boot2docker for the IP and port.
export "DOCKER_HOST=tcp://$(boot2docker ip 2> /dev/null):$(boot2docker info | sed 's/^.*DockerPort.:\([0-9]*\).*$/\1/')"