Sylvain Girard
Sylvain Girard

Reputation: 388

Get https://registry-1.docker.io/v2/: dial tcp 34.201.236.93:443: connect: connection refused

I'm getting the error in the title when running docker run hello-world. The host is an Ubuntu Server 18.04 sitting behind a corporate firewall. I tried configuring the proxy settings in every which way I could find:

Needles to say that none of them worked. Some relevant outputs:

axcel@axcel:~$ systemctl show --property=Environment docker
Environment=
axcel@axcel:~$ docker run hello-world
Unable to find image 'hello-world:latest' locally
docker: Error response from daemon: Get https://registry-1.docker.io/v2/: 
dial tcp 52.206.40.44:443: connect: connection refused.
See 'docker run --help'.

Settings for the host itself are obviously working since I was able to download and install docker. I have absolutely no idea why docker isn't taking the proxy settings.

Upvotes: 1

Views: 7948

Answers (1)

Sylvain Girard
Sylvain Girard

Reputation: 388

Apparently it was caused by an unescaped backslash in the http-proxy.conf file.

[Service]
Environment="HTTP_PROXY=http://domain\user:passwordproxy.example.com:443/"

Should be

[Service]
Environment="HTTP_PROXY=http://domain\\user:passwordproxy.example.com:443/"

Upvotes: 1

Related Questions