dotcloud/docker — pull request #6074 by michaelneale (2014-05-28 05:37:22+00:00)
Title: Adds HOSTNAME env value, if set, to /etc/hosts extra

When a user sets HOSTNAME environment var, that can be accessed via $(hostname) (that is common, and works now),
however, it is not a resolvable hostname.

This adds the HOSTNAME value, if it appears, to the /etc/hosts extras section (with the network IP address) so that it will resolve, should anyone need it.
(I needed it). Does not interfere with -h or any other options.

Docker-DCO-1.1-Signed-off-by: Michael Neale (github: michaelneale)