docker: Error response from daemon: Get https://registry-1.docker.io/v2/: proxyconnect tcp: EOF

Viewed 8805

Using a fresh Docker desktop (2.3.0.5) installation on Windows 10, I am not able to pull any image. I get this error :

docker: Error response from daemon: Get https://registry-1.docker.io/v2/: proxyconnect tcp: EOF 

I am behind a corporate proxy, so I've tried configuring it :

  • with credentials, following http://domain\username:password@proxy-url.com:port format
  • like above, but with special characters encoded : https://www.url-encode-decode.com/
  • without credentials
  • with http/https
  • without http/https

but nothing seems to work..

There's really not much help in the logs : what else can I try ?

3 Answers

Since we can configure a proxy for http and https, I had put what I thought was the proper value for each, ie :

  • http://domain\username:password@proxy-url.com:port
  • https://domain\username:password@proxy-url.com:port

(with special characters in the password URL encoded with https://www.url-encode-decode.com/ )

but it wasn't working.. I tried putting the http string for both http and https, and it worked ! (I guess the corporate proxy doesn't support https internally)

Please check the dockerservice configuration /etc/systemd/system/docker.service.d/http-proxy.conf, if the configuration file is like this,

[Service]
Environment="HTTP_PROXY=http://proxy.example.com:80"
Environment="HTTPS_PROXY=https://proxy.example.com:443"

Please remove the https:// and http://

My issue was that i was behind a corporate proxy and hence i was unable to reach the registry-1.docker.io.

Solution:

I bypassed this URL registry-1.docker.io in the proxy server for following

SSL bypass Authentication Bypass. Then i configured the proxy settings in docker.service file in RHEL server as

Environment="HTTP_PROXY=http://proxy.example.com:80"
Environment="HTTPS_PROXY=http://proxy.example.com:443"
NO_PROXY=“tnd-harbor.india.airtel.itm,10.241.99.232,
registry-1.docker.io/v2/”   

Make sure the HTTPS_PROXY protocol is http.

By doing this i was able to fetch images.

Related