-
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 VM Incorrect use of Proxy URL #1511
Comments
Thanks @pbrooko for the very detailed report. We completely agree with your proposed solution, and we have an already ongoing ticket open in the development team to implement it. We're going to let you know about the progress in there. |
@jeanlaurent re 'we have an already ongoing ticket open in the development team to implement it. We're going to let you know about the progress in there.' would you mind to reference the bug ID here? This would allow for tracking progress easily :) |
@mi-hol it's already the case, i wish you could see it, but actually this is a closed source repo, so you won't see it. |
@pbrooko thanks for your suggestion -- I have implemented this policy in the |
We now have a special channel of Docker for Mac which contains builds from the I installed this version:
and then ran a local proxy with Now I see this environment variable in containers:
where |
Awesome, thank you @djs55! I've just installed the Edge version, and can also confirm that everything is working as expected now. Images pull down correctly, and containers are able to grab packages without any hackery 👍 |
@djs55 Is there an equivalent "docker.for.mac.localhost" for linux / windows based installations? |
@mmucklo unfortunately there's no |
@djs55 Okay, thanks for the reply - The docker.for.mac.localhost is great, btw. - I think what I'm looking for now is some hostname that would be common across all platforms (to refer back to the hosted OS), that way I could have a common configuration for all installations of docker... |
when will this to be released? Docker ce mac version 17.09.1-ce-mac42 (21090) still unfixed.
|
Issues go stale after 90d 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. |
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
On a corporate/university network with NTLM based authenticating proxy, a user should be able to download images from the Docker hub, given the correct proxy details.
Actual behavior
Attempting to pull an image fails with the following error using the system proxy settings:
Error response from daemon: Get https://registry-1.docker.io/v2/: http: error connecting to proxy http://localhost:3128: dial tcp [::1]:3128: getsockopt: connection refused
Note: This appears very similar to the issue raised in #1238, except the problem has nothing to do with SCOKS5 as discussed there, and instead appears to utilizing the incorrect IP / host string for the proxy server.
Background
Many *nix applications have trouble correctly dealing with NTLM authenticating proxies, and so often the CNTLM project is used to allow programs to instead connect to a simple http proxy running on localhost, which transparently handles communicating/authenticating with the upstream NTLM proxy.
Steps to reproduce the behavior
localhost
(such as CNTLM)Workaround
I have managed to work around the issue by manually setting the Docker For Mac proxy to point to the Mac's host IP within the Docker for Mac VM network (in my case
http://192.168.65.1:3128
). This fixes the issue, and allows the VM to connect to the actual proxy and download images.It appears that the proxy settings are simply copied verbatim into the Docker VM, and as a result if the proxy points to
localhost
, the Docker daemon tries to connect to a proxy running within the Docker VM, and not on the host the Mac. This is confusing to the user as Docker for Mac tries to abstract away the VM running the the Docker daemon, and expects the error to have come from their Mac and not from within the VM.Proposed steps to fix the behavior
Instead of simply copying the proxy string into the VM, it should first be checked for strings pointing at the Mac host such as:
localhost
127.0.0.1
::1
and be automatically substituted with the IP of the host Mac on the Docker VM <--> Mac network (in my case
192.168.65.1
). This will allow the user to keep the illusion of Docker actually running on their Mac without digging to find the internal VM IP's.The text was updated successfully, but these errors were encountered: