Where proxy_server and port are my OSX settings, not my environment variables.
But it ignore authentication parameters, since when I search a docker image, I get
$ docker search cassandra
Error response from daemon: Get https://index.docker.io/v1/search?q=cassandra&n=25: Proxy Authentication Required
Actually, I was looking at the code (I’m discovering it, so I may be wrong), but I see that It just take environment variables :
But actually, it does not take environments variables but OSX settings. However, I don’t figure out how docker get OSX settings proxy, but it seems that it just skips authentication informations.
$ docker version
Client:
Version: 1.12.0-rc3
API version: 1.24
Go version: go1.6.2
Git commit: 91e29e8
Built: Sat Jul 2 00:09:24 2016
OS/Arch: darwin/amd64
Experimental: true
Server:
Version: 1.12.0-rc3
API version: 1.24
Go version: go1.6.2
Git commit: 876f3a7
Built: Tue Jul 5 02:20:13 2016
OS/Arch: linux/amd64
Experimental: true
The system proxy settings are not sufficient for docker to use and I need to run a special proxy analysis every time my network switches. This solution is somewhat DOA for me. If I could force the script to run before each restart of docker and docker use those proxy settings, that would be ideal.
I tried to configure the proxy in the docker preferences from the docker app on mac. but i get an error
docker run -d -p 80:80 --name webserver nginx
Unable to find image 'nginx:latest' locally
Pulling repository docker.io/library/nginx
docker: Error while pulling image: Get https://index.docker.io/v1/repositories/library/nginx/images: x509: certificate signed by unknown authority.
See 'docker run --help'.
+1 for this, too.
I’m also having trouble getting my proxy setup to work.
I need to connect to a local http proxy running on my machine which then routes the traffic to our corporate NTLM proxy. But obviously setting something like http_proxy=http:localhost:1234 will not work. In Virtualbox there is a “magic” IP address where you can always connect to the host OS. So I can set http_proxy=http://10.0.2.2:1234 and it works like a charm. I really would love to have something like this as an option in order to be able to have containers using my local proxy.
Its a complete showstopper for any one behind a proxy server which is probably a majority of corporate users. Not to mention theres also no easy way to insert CA’s for ssl inspection.
It really takes 4+ months to get this functionality in? I find that very hard to believe, Please fix this so i can stop telling people someday docker might work locally on osx within our corporate network.
The only way I found around this whole problem was to package my local http proxy into a docker container and route all traffic from other containers to this one. It is a tedious solution but at least It works for me now.
I’m having the same problem, but I really want to understand if it’s really a problem.
I’m running Docker for Mac 1.12.0-1 under 10.10.3
If I look at the Docker Preferences screen, in the Advanced tab, I see that my proxies have been extracted from the OS (though they are greyed out). Also, when I do a docker info I see the correct proxy information.
However, when I try to build the simple Dockerfile below:
FROM docker/whalesay:latest
RUN apt-get -y update && apt-get install -y fortunes
CMD /usr/games/fortune -a | cowsay
I get:
Sending build context to Docker daemon 2.048 kB
Step 1 : FROM docker/whalesay:latest
---> 6b362a9f73eb
Step 2 : RUN apt-get -y update && apt-get install -y fortunes
---> Running in f433f36bae72
Ign http://archive.ubuntu.com trusty InRelease
Ign http://archive.ubuntu.com trusty Release.gpg
Ign http://archive.ubuntu.com trusty Release
Err http://archive.ubuntu.com trusty/main Sources
Err http://archive.ubuntu.com trusty/main Sources
403 Use Proxy Server
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty/main/source/Sources 403 Use Proxy Server
E: Some index files failed to download. They have been ignored, or old ones used instead.
The command '/bin/sh -c apt-get -y update && apt-get install -y fortunes' returned a non-zero code: 100
However, if I add proxy info to the apt-get line (which I found somewhere whilst Googling), everything works OK.
This issue does not seem fixed to me either. The issue being on OSX I cannot set the build environment variables from outside the build command / process.
My use case is where automation, in-office, and out-of-office employees all need to use the same codebase, and be able to execute and build the system under test. Proxy settings are different between each use case, and it’s unreasonable to expect someone to make upstream code changes to accommodate local network setups.
I’m still hunting for any solution that allows me to service this other than “cache the intermediate build layers at Starbucks before coming into the office”.