Docker Community Forums

Share and learn in the Docker community.

Proxy breaking docker networking


(ES) #1

i’m behind a corporate firewall. hence needed to set http_proxy and https_proxy and pass them as environment vaiables via the docker compose (v2) to my containers.
the containers managed to pick these env variables, and indeed calls are made through the proxy.
problem is, my containers need to call each other using names (the networking feature supported by docker compose v2) and now with the proxy set this doesn’t work anymore.
how can i limit the proxy to effect only ‘external’ ips and prevent breaking the docker compose networking feature?


(Dann Church) #2

Since you’re using compose, couldn’t you just pass a no_proxy environment variable using the comma separated names of the other docker services that the specified service need to communicate with. A bit of a PITA but it should work.


(ES) #3

This indeed seems to do the trick.
Would be great to have a more robust solution but we’ll take what we can get.

Thanks for the quick tip!