-
Notifications
You must be signed in to change notification settings - Fork 121
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
Docker for Mac doesn't read hosts /etc/hosts correctly when using aliases #983
Comments
@flxsource thanks for the reporting the issue, I've raised another issue on the |
I've merged a fix for this into the master branch which should be released in beta 37, due in a couple of weeks. |
@flxsource, could you please confirm that the latest beta (39) resolves the problem? |
Both stable and channels should now contain the fix, so closing. @flxsource please re-open that issue if the fix doesn't work for you. Thanks! |
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 Engine is able to resolve the host name and any aliases declared in the
/etc/hosts
file on the host OS.Actual behavior
Docker Engine is only able to resolve the host name, but not any aliases.
Information
Diagnostic ID: AF53934A-7F40-4AAA-82E7-6093DE58E779
We are running a Docker registry on our internal network, and a second registry configured as a pull through cache on the same machine, but under a different hostname. The two hostnames used are currently NOT in DNS, so modifying the
/etc/hosts
file is required.The problem is that when using the format
[IP Address] [Hostname] [Aliases]
in/etc/hosts
Docker Engine is only able to resolve the[Hostname]
, not any of the[Aliases]
. If the line is split to be multiple[IP Address] [Hostname]
then Docker Engine is correctly able to resolve all of them.Steps to reproduce the behavior
/etc/hosts
(a bogus hostname can be provided, to then allow the correct hostname to be declared as an alias.The text was updated successfully, but these errors were encountered: