Docker Community Forums

Share and learn in the Docker community.

Unset proxies in containers


(Quirkles) #1

So, my issue is that my container env is picking up the http proxy from my global config. I need the proxy to allow docker to talk to the outside world, but my containers need to speak to each other on the network they are on.

when i inspect my container(s) env i get :

“HTTP_PROXY=http://proxygateway.domain:6666”,
“http_proxy=http://proxygateway.domain:6666”,
“https_proxy=http://127.0.0.1:80”,
“HTTPS_PROXY=http://127.0.0.1:80”

my dockerfile looks like:

ENV proxy http://127.0.0.1:80
ENV http_proxy $proxy
ENV https_proxy $proxy
ENV HTTP_PROXY $proxy
ENV HTTPS_PROXY $proxy

So its getting the https proxies form the dockerfile, but not the http, which are being inherited from my global docker config.

as a side note, i dont actually want to use 127.0.0.1:80 Ijust wanted to see if they were getting picked up at all

I am using OSX 10.11.6
docker version 1.12.1