Docker Community Forums

Share and learn in the Docker community.

Need to specify proxy settings

(Andy Lawrence) #1

Expected behavior

I need a way to specify proxy settings to the VM so that I can pull images from docker hub. Even if I could get it to read my PROXY_URL env, that’d be enough I think!

Actual behavior

I dont see a way to do it


  • docker-for-mac beta 6
  • OSX 10.10.5 (gotta love corporate images…)

Proxy server setting in native docker for mac
Proxy/SSL/CA question
(Justin Cormack) #2

You are right, there is currently no way to do this, we are aware of this. What kind of proxy is it?

HTTP_PROXY on Mac Beta
(Andy Lawrence) #3

It’s a forward-proxy for gating http/https Internet access – does that
answer your question?

(Gstipton) #4

This is a deal breaker for me as well. Is some form of proxy support on the near-future roadmap?

(David Maze) #5

It would be enough for me to be able to set HTTP_PROXY for the daemon, like docker-machine create ... --engine-env HTTP_PROXY=....

My Docker registry is in an Amazon VPC, and we have a “bastion” host we can ssh -D 1080 through. Once I do that, ssh provides a SOCKS proxy I can use. In Docker Machine land, I instead use Polipo to provide an HTTP proxy, and then point HTTP_PROXY at that. If there were a way for Docker-for-Mac to set that variable for the daemon, it would meet my needs without needing to change anything in the daemon itself.

(Harsimran Singh Maan) #6

Is this on the roadmap? I need the proxy setup to pull images from an internal registry.

(Atsatt) #7

I’m assuming that you intend to fix this. I am very enthusiastic about the new implementation, but…

For me, and I suspect many others, the “VPN compatibility mode” is a great step forward, and critical to enable use while connected to a corporate VPN; however, we must be able to route requests through the corporate HTTP/HTTPS proxy in order to reach

Without a fix, this means that even with this new implementation on the Mac, it is still the case that neither our remote developers (myself included) nor our customers who rely on the Cisco VPN can use our Docker based solutions.

(Atsatt) #8

Further, in case it is not obvious… proxy settings need to be switched on/off as the VPN connection is enabled/disabled.

It would be awesome if proxy switching were automagic, but I would be OK with a manual step (e.g. an item in the Docker menu).

(John Mahoney IV) #9

I am interested in this as well.

(Alexellis2) #10

While HTTP_PROXY could be defined for an individual image at build time, it has to be available for the daemon too, so that images can be pulled from the HUB.

What is restricting the option from being applied to the daemon’s config in the Alpine Linux VM?

Is there any back-door to the Alpine Linux VM as of yet? i.e. as in docker-machine ssh of old.

(Chris Fordham) #11

Deal breaker here. An ETA on this is appreciated.

(Chris) #12

I need this as well!

(Adam) #13

Same here. Need HTTP_PROXY, HTTPS_PROXY and non-proxy hosts setting when on corporate network, otherwise no proxy at all.

On the mac at least, there’s a mechanism to get inside the alpine linux vm listed here:

To get a console on the Linux machine, use login=root and no password after typing:
screen ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/tty

(Sundsdocker) #14

Same for me need this feature as well!

(Oamike) #15

Same here - need the ability to support proxy and non-proxy switching. best if it uses the http_proxy environment variables in terminal.

(Chris Fordham) #16

It looks like running the daemon can only take proxy from the shell environment variables as opposed to configuration or cli options for the command ( ). So we need to know how to have the daemon run with HTTP_PROXY, HTTPS_PROXY and NO_PROXY env vars such as shown in step 3 of

So really what I am asking is what is the service manager or equiv that runs the docker daemon and how do I modify what it runs and then restart it (assume restart via pinata restart) ?

(Chris Fordham) #17

Looks like its standard alpine linux service. Probably modify /etc/init.d/docker and just restart the service as opposed to the VM. That might be a viable temporary solution for now.

(Dave Tucker) #18

Thanks for all the +1’s for HTTP Proxy support. We’re working on it, and hope to have it available in a future beta release!

(Ulucaydin) #19

I can’t also pull images as I’m behind a proxy. +1 !

(Chris Fordham) #20

Hi @davetucker thanks, can you provide a workaround for the time being?