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
use something else other than .localhost at the end of docker.for.mac.localhost #1837
Comments
I'm seeing this problem too. How about |
A container-internal hostname that is dependent on the host OS is the wrong solution. If I write code that depends on there being a |
Agreed @atuttle, some kind of |
This also isn't working for me. Anything .localhost in my container resolves to 127.0.0.1 - localhost of the container, not the IP of the host machine.
|
If someone hasn't come across it yet, a workaround would be to use IP address 192.168.65.1 |
I'm not seeing any question quite like this and this seems as good of a place as any to ask, so: I can ping It's driving me crazy! Any suggestions to reach this address? (changing it is not an option for me) |
@HaysHopkins unless you've setup DNS or a hosts file entry for that address, you shouldn't expect it to work. You can configure the website to respond for If you can't ping |
This issue has been fixed in 17.12.0-ce-mac46 release |
"Fixed" is arguable as the container still needs to know that it's running on docker for mac; as noted in October. |
Using Discussions about how a container should know if it should interract with the effective host (mac) or the actual host (vm) is out of the scope. Closing |
hostname has changed in current mac releases. See: - https://docs.docker.com/docker-for-mac/networking/#per-container-ip-addressing-is-not-possible - docker/for-mac#1837
Closed issues are locked after 30 days of inactivity. 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. |
Expected behavior
docker.for.mac.localhost works on guest's Chrome browser
Actual behavior
docker.for.mac.localhost doesn't work on Chrome because .localhost is strictly reserved for local ips and Chrome won't try to resolve the hostname
Suggestion
Use something else other than .localhost for tld for the special Mac-only DNS name docker.for.mac.localhost because .localhost is supposed to be reserved for local only traffic. See https://en.wikipedia.org/wiki/.localhost
The text was updated successfully, but these errors were encountered: