Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File /etc/hosts is not being updated #1

Open
danieldevsquad opened this issue Jul 3, 2018 · 5 comments
Open

File /etc/hosts is not being updated #1

danieldevsquad opened this issue Jul 3, 2018 · 5 comments

Comments

@danieldevsquad
Copy link

PS: Thanks for sharing this solution!!

After starting the container:

image

The log messages suggest that a new entry was created in my /etc/hosts, but for some reason it's not there.

image

Any ideas?

I am running it on Mac

@nesl247
Copy link

nesl247 commented Jan 16, 2019

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.

@nesl247
Copy link

nesl247 commented Jan 16, 2019

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.

@baod-rate
Copy link

It seems like docker/for-mac#483 is the cause?

@nesl247
Copy link

nesl247 commented Jan 24, 2019

I don't believe that is related at all.

@vdroznik
Copy link

I have set write permission for current user to /private/etc/hosts and it works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants