A small enhancement to your HOST_IP grepping, the host's public and private IP is available in /etc/environment. docker0 may or may not be present before a docker run as well due to socket activation, so your results may vary with a brand new CoreOS VM where docker has not started yet. For example, we are resolving this in Deis with https://github.com/deis/deis/pull/851