dotcloud/docker — pull request #4344 by danielwegener (2014-02-26 00:14:03+00:00)
Title: Adds container env variable for its own IP address

Some processes need to know the ip address on which they will be be reachable (in my current example, its the graylog-server that exposes this address through an node advertising endpoint). It fails to detect its own _public_ IP since even the virtual interface (172...) is marked as loopback-interface.

A Workaround is to add something like
```ENTRYPOINT export HOST_ADDR=`hostname --ip-address` && ...```
to the Dockerfile.

It would be really nice to have the _public_ reachable IP (e.g. _linked_ or _exposed_ iterface) an environment variable - the name `HOST_ADDR` is just a proposal and tbd.