docker-hoster
docker-hoster copied to clipboard
File `/etc/hosts` is not being updated
PS: Thanks for sharing this solution!!
After starting the container:
The log messages suggest that a new entry was created in my /etc/hosts
, but for some reason it's not there.
Any ideas?
I am running it on Mac
Having tried this out, my guess is the atomic nature in which it moves the file. Since the file is mounted through a VM and not via a symlink/hardlink or however docker does it on Linux, it's removing the link between the host and the file in the container in the VM.
Ok, figured more of it out. That isn't entirely the issue. It's also that /etc/hosts
isn't shared by default with Docker for Mac. /private/etc/hosts
is. If you change that part of the command, it will at least attempt to edit the right file. However, it will fail to move because of the previous issue I mentioned.
It seems like https://github.com/docker/for-mac/issues/483 is the cause?
I don't believe that is related at all.
I have set write permission for current user to /private/etc/hosts
and it works