I am running the following command from docker within an ubuntu virtualbox and getting a connection refused error.
I am behind a corporate proxy and have configured my environmental vairables to use the proxy and username and password. I also tried using a proxychain.
root@mbak1-VirtualBox:~# sudo proxychains docker pull busybox
ProxyChains-3.1 (http://proxychains.sf.net)
Using default tag: latest
Error response from daemon: Get https://registry-1.docker.io/v2/: dial tcp 54.152.209.167:443: getsockopt: connection refused
root@mbak1-VirtualBox:~# docker pull hello-world
Using default tag: latest
Error response from daemon: Get https://registry-1.docker.io/v2/: dial tcp 35.169.231.249:443: getsockopt: connection refused
My situation seems to be the exact same as the following:
https://github.com/moby/moby/issues/31510
Update
I tried adding my proxy config to the following file but it didn't work. Additionally the file did not exist: /etc/sysconfig/docker .
I also tried to access the actual URL but I am getting a JSON response saying unauthorized.
update2
I think the problem is my DNS config. In the virtual machine I am getting the following for the lookup:
mbak1@mbak1-VirtualBox:~$ nslookup registry-1.docker.io
Server: 127.0.0.1
Address: 127.0.0.1#53
Non-authoritative answer:
Name: registry-1.docker.io
Address: 34.200.28.105
Name: registry-1.docker.io
Address: 52.54.216.153
Name: registry-1.docker.io
Address: 34.200.90.16
Name: registry-1.docker.io
Address: 52.204.202.231
Name: registry-1.docker.io
Address: 52.22.181.254
Name: registry-1.docker.io
Address: 54.152.209.167
Name: registry-1.docker.io
Address: 34.205.207.96
Name: registry-1.docker.io
Address: 35.169.231.249