In short: How can I set the HTTP/HTTPS proxies for Docker on Mac OS X?
In detail:
I run Docker (1.12) on Mac OS X behind a proxy. I followed the installation instructions and installed boot2docker. This is working fine if I pull from my network-internal Docker registry.
However, I get the following error when pulling from docker.io:
machine:~ me$ docker run ubuntu echo hello world
Unable to find image 'ubuntu' locally
Pulling repository ubuntu
2014/06/30 13:23:26 Get https://index.docker.io/v1/repositories/ubuntu/images:
dial tcp: lookup index.docker.io: no such host
Note 1: DOCKER_HOST
, http_proxy
and https_proxy
are available in the environment (running env
displays all three).
Note 2: I read in other posts that this error occurs when the daemon is not running properly. However, docker version
doesn't show any problems. Moreover, I can pull and run images pulled from my network-internal Docker registry.
Note 3: I was able to set up Docker on Red Hat Linux (RHEL). I had to add the proxy information to /etc/sysconfig/docker
. I read that there is a similar file on Ubuntu (/etc/init/docker.conf
). However, I could not find that file for Docker (or boot2docker?) on Mac OS X.