Expected behaviorI am behind a corporate proxy so I configured the preferences with an HTTP Proxy so that I can pull images from Docker Hub when building my containers, but don't expect the same settings to be injected into the containers as environment variables. Actual behaviorThe images are pulled successfully through the proxy however, the same HTTP Proxy settings are being injected in to the containers as environment variables.
![](/uploads/1/2/3/7/123759274/117037288.jpg)
![Example Example](/uploads/1/2/3/7/123759274/596509747.png)
This causes some issues since I am using docker-compose to link two containers and they are attempting to communicate with each other through the proxy (which fails). I tried to exclude the hostnames of the linked containers via the preferences, hoping that they will be injected as $NOPROXY but this doesn't happen. Steps to reproduce the behavior. Configure the preferences with an HTTP/S Proxy and Exclude values.HTTPPROXY: localhost,co.corp. docker run -it ubuntu bash.
echo $HTTPPROXYoutput: echo $NOPROXYoutput: empty. Strongly agree, this behavior where a proxy I happen to be using for web browsing on my mac automatically and without my choice gets injected into all containers seems a bit nuts.This feature, although documented , is too clever, causes more confusion than it's worth. Let users enter the proxy in the Docker Preferences tab, anyway there's no guarantee you'd want to use the same proxy the Mac is otherwise using.And a really bad bug is that Docker for Mac doesn't 'reset' this after 'unchecking' 'Web Proxy (HTTP)' in Settings = Network = Proxies tab. The old value is still in the Docker Preferences, grayed out.
I have to actually delete the ip and port from the Mac settings, even though those fields are being ignored by the Mac. I think this issue may be resolved better.Let me explain the problem I encounter first:. I am using docker behind a corporate proxy.
I use docker to maintain and iterate my development environment. To pull images from dockerhub, of course, I need to set docker daemon proxy, as this:.
I need to access Internet in the development environment, so I also set the proxy inside container, as this:. And I need to connect to company local git through https/ssh, which shouldn't be accessed with proxy setting. As you can see in the pictures above, I set 'git.local.co' to noproxy both in docker daemon proxy setting and in container env. Now I encounter the problem:a. I can not access 'git.local.co' now, because vpn passthrough strategy pass all my container's flow into docker daemon proxy, even when noproxy is set.b. If I want to access 'git.local.co', I have to unset docker daemon proxy to 'system proxy', in order to use container proxy completely;c.
This tutorial uses the `siomiz/softethervpn` Docker image to launch a SoftEther VPN server inside a Docker container. You can then connect to this VPN from your desktop or laptop computer, and use it to access the Internet through a secure tunnel. This method is fast and easy, and requires you to run only one command on your server.
If I need to download images from dockerhub, I have to set docker daemon proxy to 'manual proxy'.d. And switching this setting require restarting docker daemon, so I have to close all my container when I am developing.
This make my life much harder.I think the key problem is that the proxy to pull images and the proxy for container(vpn passthrough) shouldn't be mixed. They are completely for different purpose. Providing two separate setting might be a better solution.Or did I misunderstand some of these setting?
Was this issue ever resolved? I have a problem similar to the original issue. My Jenkins server has proxy setting for both docker engine and docker containers. I need a proxy to build containers and install container binaries (apt-get, npm install etc) but I do not require proxy settings injected into containers after install.The docker engine proxy settings are added via:/etc/systemd/system/docker.service.d/http-proxy.confThe docker container proxy settings are added via:/.docker/config.jsonMy jenkins job will build containers locally and deploy to my development environment but the proxy settings are injected into the containers. This prevents communication between containers since they try to speak to each other via proxy.
![](/uploads/1/2/3/7/123759274/117037288.jpg)