NO_PROXY / no_proxy appears to be ignored when pulling images
- [x] I have tried with the latest version of Docker Desktop
- [x] I have tried disabling enabled experimental features
- [x] I have uploaded Diagnostics
- Diagnostics ID:
94140753-E013-4E85-9093-1E9816B31DEB/20210714192944
Expected behavior
With this manual proxy setup in Docker for Mac:
http_proxy=proxy.example.com:81
https_proxy=proxy.example.com:81
no_proxy=localhost,127.0.0.1,172.16.0.0/12,192.168.0.0/16,.dev.example.com
I would expect that I could pull image from Docker Hub via the proxy and pull internal images from 'registry.dev.example.com', however this does not work. It appears as if no_proxy is ignored in this use case.
Actual behavior
When trying to pull from registry.dev.example.com it fails with a TLS error, very likely because it is trying to go through the proxy.
Error response from daemon: Get https://registry.dev.example.com/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
Information
- macOS Version:
10.15.7 - Intel chip or Apple chip:
Intel - Docker Desktop Version:
3.5.2
Steps to reproduce the behavior
- Be behind a proxy that can be used to access Docker Hub
- Have an internal registry that can be reached directly (and will not work when going through the proxy)
- Try to configure Docker so that you can pull images from both Docker Hub and the internal registry, as the same time.
I just encountered this on my Mac as well. I have to turn on the proxy settings during my docker build process so that I can reach out to the public internet for stuff, but then I have to disable my proxy settings when I docker push my built image to a local container registry. It's kind of a pain, and it would be wonderful if this got fixed.
And if you need both during something like a multi-stage build then there is basically nothing you can do. I am using an Ubuntu VM locally to work around this at the moment.
I have been encountering this issue as well for some time now, kind of frustrating.
It looks like this bug has been around for a while. I came across https://github.com/docker/for-mac/issues/2723 as well.
Finding this to be quite problematic when using a local container registry that should not use the proxy.
Last seen working on version 3.3.2, anything newer does not respect the no proxy configuration.
+1 need to restart the docker vm depending on if I am building or pushing to a registry, this is the worst thing I have to say about my mac :) #2723
also running into this.
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
/remove-lifecycle stale
/lifecycle frozen
Everyone at my workplace has this issue. We have to turn off proxy settings to get to pull images from a local servers.
This happens with all our macs Intel and M1 versions.
hi, fixes around handling proxy settings have been released in 4.5.0. Could you update and confirm whether that resolves the issue you've been seeing?
hi, fixes around handling proxy settings have been released in 4.5.0. Could you update and confirm whether that resolves the issue you've been seeing?
This does not resolve the issue I am seeing.
Just to confirm:
- With the manual proxy set, I can pull images from docker hub.
- With no proxy empty (maybe my proxy figures it out, it is supposed for other assets) I get: "Error response from daemon: Get "https:my-server": Bad Gateway"
- With no proxy set to my domains I get: "Error response from daemon: Get "https:my-server": net/http: TLS handshake timeout"
- If I turn manual proxy off I can get local assets.
Are there any diagnostics or logs available I can provide?
I can not re-test this anymore, because I am no longer in the same environment, but I am hoping that others can test and confirm that this is fixed.
this is still not fixed, on macos 12.3.1, running docker for mac 4.8.2.
Same for me. On latest and still have to put in ip addresses/cidr ranges
On Thu, May 19, 2022, 11:49 AM Daniel Colceag @.***> wrote:
this is still not fixed, on macos 12.3.1, running docker for mac 4.8.2.
— Reply to this email directly, view it on GitHub https://github.com/docker/for-mac/issues/5844#issuecomment-1131894534, or unsubscribe https://github.com/notifications/unsubscribe-auth/AI5V7IAHZ3LIO4PLIBAD653VKZPJDANCNFSM5AMCJ6TQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Still broken, it is unusable when interacting with anything not on my local machine. Last update made it even worse as it tries to refresh token from dockerhub when I login to a registry on local network... but that's not possible without proxy enabled, but then the internal registry cant be reached because it attempts to use proxy. Driving me crazy!
Still broken. Assuming you want to do docker login repo.artifactory.some.com, you will need to add the following values explicitly to the no_proxy list:
artifactory.some.comrepo.artifactory.some.com
This is just inconvenient for basically no reason, as far as I can tell.
Optimally users should be able to set *.some.com in the no_proxy and be done with it.