allow /etc/hosts /etc/resolv.conf and /etc/hostname to be changed

Fixes #2267
My attempt to fix #2267
When a container is restarted it is launched with the entry point/cmd
executed again, right? If customisation is done as a matter of course for
the app- it should work ok. I presume a start could happen after a network
hangs and thus new information will be reflected in hosts.

On Saturday, August 16, 2014, Sven Dowideit <notifications@github.com>
wrote:

> In docs/sources/articles/networking.md:
>
> > @@ -731,3 +731,13 @@ usual containers.  But unless you have very specific networking needs
> >  that drive you to such a solution, it is probably far preferable to use
> >  `--icc=false` to lock down inter-container communication, as we explored
> >  earlier.
> > +
> > +## Editing networking config files
> > +
> > +Starting with Docker v.1.2.0, you can now edit `/etc/hosts`, `/etc/hostname`
> > +and `/etc/resolve.conf` in a running container. This is useful if you need
> > +to install bind or other services that might override one of those files.
> > +
> > +Note, however, that changes to these files are not saved during a
> > +`docker build` and so will not be preserved in the resulting image.
> > +The changes will only "stick" in a running container.
>
> cool - then perhaps
>
> Note, these files are not saved bydocker commit, or between steps in adocker
> build, and so will not be preserved in the resulting image.
>
> and then something about them also not persisting when a container is
> restarted - which tbh, I'm still a little puzzled about.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/docker/docker/pull/5129/files#r16321230>.
>


-- 
Michael D Neale
home: www.michaelneale.net
blog: michaelneale.blogspot.com