Docker VM Incorrect use of Proxy URL #1511
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.
Attempting to pull an image fails with the following error using the system proxy settings:
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.
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
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
It appears that the proxy settings are simply copied verbatim into the Docker VM, and as a result if the proxy points to
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:
and be automatically substituted with the IP of the host Mac on the Docker VM <--> Mac network (in my case
@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:
@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...
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.