Proxy breaking docker networking

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?

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.

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!