dotcloud/docker — pull request #2131 by zilin (2013-10-08 21:56:47+00:00)
Title: replace 127.0.0.1 by the assigned IP address in the container's /etc/hos...

I tried to run a hadoop cluster inside a docker container. However it requires an entry of ip->hostname in /etc/hosts in order to let slave nodes talk to the master node. The /etc/hosts is read-only when the containers run, so this CL will automatically add an IP->hostname entry to /etc/hosts.

note:
have to move code from runtime.go to container.go since container.NetworkSettings.IPAddress is not assigned until allocateNetwork() get called.