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 <michael.neale@gmail.com> (github: michaelneale)