-
Notifications
You must be signed in to change notification settings - Fork 285
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
Windows hosts file has wrong IP address for host.docker.internal #10420
Comments
This is still problematic in version 3.3.1 (63152) Please add a way to configure this or check it in the Docker GUI, or maybe post documentation on how to work around tis issue |
Still an issue after updating to 3.5.1 |
Issues go stale after 90 days of inactivity. Prevent issues from auto-closing with an If this issue is safe to close now please do so. Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. |
/remove-lifecycle stale |
/lifecycle frozen |
This is highly annoying. Are there any good workarounds? I've lost days of development time due to this issue |
Still a problem in 4.8.1. Just lost about 4 hours finding out why some services suddenly don't work anymore. |
Highly annoing problem. Are there any workarounds for this? |
As a temporal solution you can modify the hosts file properties to be read-only. |
This was originally opened as #8988, but was never acted upon and auto-closed. This is still a (highly annoying) issue.
Expected behavior
Hosts file contains the correct IP address for the primary network interface for both
host.docker.internal
andgateway.docker.internal
.Actual behavior
Docker for Windows pulls the IP address of a random network adapter (usually one that's not even connected), and uses that as the IP address.
Information
Steps to reproduce the behavior
Have multiple network cards connected to a machine, and randomly connect/disconnect them to get the wrong IP address populated.
Proposed solution
Allow the user to specify which network adapter to use for populating the
host.docker.internal
andgateway.docker.internal
addresses. At the very minimum, give us the option to turn the auto-update of the IP address off. Or, even better, define a loopback network interface with a known IP address so you don't have to mess with the hosts file constantly!The text was updated successfully, but these errors were encountered: