Is there anyway I can get Docker to update the /etc/hosts of all containers?
I want each container running on the host machine to know the hostname of all other containers running on the host machine.
Is there anyway I can get Docker to update the /etc/hosts of all containers?
I want each container running on the host machine to know the hostname of all other containers running on the host machine.
Yes, you can. It is automatically done when you link the containers: https://docs.docker.com/userguide/dockerlinks/#updating-the-etchosts-file
You can try using weave, which is a project I am working on. It gives you an overlay network with DNS, so you can forget about the hosts files, linked containers and most of those things.