- Option 1:configure Docker Desktop to use Manual proxy settings: the "whale" context menu / Settings / Resources / Proxies / Manual proxy configuration
- Option 2: (might work, didn't test) set
HTTP_PROXY
/HTTPS_PROXY
/NO_PROXY
as system environment variables, not user ones
In both cases, restart Docker Server
I work in a corporate environment behind a proxy, so that all outgoing HTTP/HTTPS request must go through http://proxy.mycorp.domain:80
So, I have:
- environment variables:
HTTPS_PROXY=http://zscaler.proxy.mycorp.domain:80
HTTP_PROXY=http://zscaler.proxy.mycorp.domain:80
NO_PROXY=.mycorp.domain,localhost,appserver.vagrant,192.168.0.0/16,192.168.99.100
%USERPROFILE%\.docker\config.json
contains:
"proxies": {
"default": {
"httpProxy": "http://zscaler.proxy.mycorp.domain:80",
"httpsProxy": "http://zscaler.proxy.mycorp.domain:80",
"noProxy": "*.mycorp.domain,localhost,appserver.vagrant,192.168.0.0/16,192.168.99.100,git.mycorp.domain,repository.mycorp.domain"
}
}
However, when I run docker run hello-world
, or docker pull hello-world:latest
, I see this:
Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
which looks like a pretty clear indication of not abiding to proxy setup
in the %APPDATA%\Docker\log
folder, there is docker.log
file, where I have this:
2020-03-06T09:35:16Z docker time="2020-03-06T09:35:16.692313962Z" level=debug msg="Trying to pull hello-world from https://registry-1.docker.io v2"
2020-03-06T09:35:31Z docker time="2020-03-06T09:35:31.692847405Z" level=warning msg="Error getting v2 registry: Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)"
2020-03-06T09:35:31Z docker time="2020-03-06T09:35:31.692874005Z" level=info msg="Attempting next endpoint for pull after error: Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)"
2020-03-06T09:35:31Z docker time="2020-03-06T09:35:31.692906405Z" level=error msg="Handler for POST /v1.40/images/create returned error: Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)"
2020-03-06T09:35:35Z docker time="2020-03-06T09:35:35.438496759Z" level=debug msg="Client context cancelled, stop sending events"
What am I missing here? Before enabling Hyper-V and installing Docker for Windows, I've been using Docker Toolbox, and it took quite some time to figure the proper setup out, but I am sure it did work, eventually.
How to configure a Docker Desktop properly? Or how to enable most verbose logging possible to figure out the issue ?
Thanks!
Docker Desktop version: Docker version 19.03.5, build 633a0ea
Windows version: Version 1809 (OS Build 17763.1039)
I think I did.. but I have already moved away from that job, so I cannot comment, unfortunately, how exactly I did it..