Docker Community Forums

Share and learn in the Docker community.

Need to specify proxy settings


(Mazur) #21

I also need to work through proxy so +1 here.


(Jensonzhao) #22

I also need this feature. In the Version 1.11.1-beta10 (build: 6662), the following environment variables are just ignored.
http_proxy
FTP_PROXY
ftp_proxy
ALL_PROXY
all_proxy
HTTPS_PROXY
https_proxy
no_proxy
HTTP_PROXY


(Pandada8) #23

I am always thinking it would be great if the docker client could forward some env to the docker engine, or add some docker pull flag like -proxy=http://xxxxxx:xx.


(Jensonzhao) #24

A workaround would be great till we have the official http proxy support.


(Jensonzhao) #25

It doesn’t work. I could modify it but whenever you restart Docker for Mac, the change is lost.


(Joachim Hill-Grannec) #26

+1 and yeah would also love to have a work around on this in the meantime. Has anyone found a way to make this work?


(Mwilmes) #27

+1 Also need to be able to specify HTTPS proxy in order to reach out for the internet.


(Acouturier) #28

Yeah, another +1 for me, though I am surprised about the expectation of making things work for VPNs and leaving out proxies since they are pretty much always stuck together


(Sebastian Wegert) #29

+1 - have to use the toolbox at work until I’m able to specify the proxy settings… :frowning:


(Martin F) #30

+1 need it as well, as this is a deal breaker


(Dotf) #31

+1 this feature is urgently needed


(Mibo) #32

an additional +1 for this feature from me


(Vicente Panizo) #33

+1 support for this is needed.


(Sesteva) #34

+1 support for this is needed.


(Lusi) #36

+1 for me too, all main companies used to work behind a proxy. :grin:


(Foolusion) #37

I used to be able to set the proxy for Docker beta for mac using the following script.

function dockerproxyon {
  screen -L -dmS docker ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/tty
  screen -p 0 -X stuff $(echo -ne '\015')$(echo -ne '\015')$(echo -ne '\015')
  sleep 1
  echo "logging in"
  screen -S docker -p 0 -X stuff root
  screen -S docker -p 0 -X stuff $(echo -ne '\015')
  sleep 2
  echo "stripping old proxy config"
  screen -S docker -p 0 -X stuff "sed -i -E '/_proxy/d' /etc/init.d/docker"$(echo -ne '\015')
  sleep 1
  echo "Setting proxy in docker."
  screen -S docker -p 0 -X stuff "sed -i -E '/Starting Docker/ a export no_proxy=*internal.net' /etc/init.d/docker"$(echo -ne '\015')
  screen -S docker -p 0 -X stuff "sed -i -E '/Starting Docker/ a export https_proxy=http://myproxy:3128' /etc/init.d/docker"$(echo -ne '\015')
  screen -S docker -p 0 -X stuff "sed -i -E '/Starting Docker/ a export http_proxy=http://myproxy:3128' /etc/init.d/docker"$(echo -ne '\015')
  
  echo "restarting docker service"
  screen -S docker -p 0 -X stuff "service docker restart"$(echo -ne '\015')
  screen -S docker -p 0 -X stuff "service docker restart"$(echo -ne '\015')
  screen -S docker -p 0 -X stuff "exit"$(echo -ne '\015')
  screen -S docker -X stuff quit
}

but now i can not restart the docker service in verion Version 1.11.1-beta12 (build: 7528)
4151b0fc71e51fb8e551d0a1870893ac99a379bc


(Foolusion) #38

Rolling back to Version 1.11.1-beta11 (build: 6974)
37559e5f6acd56a4810963acc7001e88f2d88017 fixed my issue.


(Theothermattm) #39

+1 unfortunately beta is unusable til this is available. can’t seem to get any of the workarounds working either.


(Dave Tucker) #40

Good news! We now have support for reading HTTP Proxy settings from OSX.
Please update to Beta 13 and let us know how you get on!


(Chris Fordham) #41

@davetucker might be useful if the Settings in GUI has some kind of hint that it uses the System Preferences config for proxy (https://beta.docker.com/docs/mac/networking/).