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) Solved 100%

when you try to pull from docker hub or docker login you will face this error.if you are behind company proxy this will be happen.here is the step for solve this error

Unable to download Docker images behind a proxy

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)

1 create systemd entry for docker service

mkdir /etc/systemd/system/docker.service.d

2.Create config file for http

nano /etc/systemd/system/docker.service.d/http-proxy.conf and add these lines to it

[Service]
Environment=”HTTP_PROXY=http://YOURPROXY IP ADDRESS HERE.com:PROXY PORT”

3.Create config file to https also

nano /etc/systemd/system/docker.service.d/https-proxy.conf and add these lines to it


[Service]
Environment=”HTTPS_PROXY=http://YOURPROXY IP ADDRESS HERE.com:PROXY PORT”

4.Reload the demon

5.Restart docker service

sudo systemctl restart docker

Now docker image pull is working

2 thoughts on “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) Solved 100%

Leave a Reply

Your email address will not be published. Required fields are marked *