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

Windows hosts file has wrong IP address for host.docker.internal #8988

Closed
1 of 2 tasks
jcoutch opened this issue Oct 12, 2020 · 3 comments
Closed
1 of 2 tasks

Windows hosts file has wrong IP address for host.docker.internal #8988

jcoutch opened this issue Oct 12, 2020 · 3 comments

Comments

@jcoutch
Copy link

jcoutch commented Oct 12, 2020

  • I have tried with the latest version of my channel (Stable or Edge)
  • I have uploaded Diagnostics

Expected behavior

Hosts file contains the correct IP address for the primary network interface for both host.docker.internal and gateway.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

  • Windows Version: 10.0.19042.546
  • Docker Desktop Version: 2.4.0.0
  • Are you running inside a virtualized Windows e.g. on a cloud server or on a mac VM: No

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 and gateway.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!

@docker-robott
Copy link
Collaborator

Issues go stale after 90 days of inactivity.
Mark the issue as fresh with /remove-lifecycle stale comment.
Stale issues will be closed after an additional 30 days of inactivity.

Prevent issues from auto-closing with an /lifecycle frozen comment.

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.
/lifecycle stale

@jcoutch
Copy link
Author

jcoutch commented Feb 18, 2021

This is still an issue with 3.1.0 (51484).

@docker-robott
Copy link
Collaborator

Closed issues are locked after 30 days of inactivity.
This helps our team focus on active issues.

If you have found a problem that seems similar to this, please open a new issue.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
/lifecycle locked

@docker docker locked and limited conversation to collaborators Mar 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants