Allow extra lines in /etc/hosts

This adds a --add-host host:ip flag which appends lines to /etc/hosts.  This is needed in places where you want the container to get a different name resolution than it would through DNS.  This was submitted before as #5525, closed, and now I am re-opening.  It has come up 2 or 3 times in the last couple days.

Signed-off-by: Tim Hockin <thockin@google.com>
I'm happy to add more docs, not exactly sure how you want them.  PTAL.

On Sun, Sep 14, 2014 at 5:06 PM, James Turnbull <notifications@github.com>
wrote:

> In docs/sources/reference/run.md:
>
> > @@ -139,6 +139,7 @@ example, `docker run ubuntu:14.04`.
> >                                   'none': no networking for this container
> >                                   'container:<name|id>': reuses another container network stack
> >                                   'host': use the host network stack inside the container
> > +    --add-host=""   : Add a line to /etc/hosts (host:IP)
>
> I think this needs a bit more documentation in here and perhaps an example.
>
> --
> Reply to this email directly or view it on GitHub
> <https://github.com/docker/docker/pull/8019/files#r17523693>.
>