this worked for me.
[root@slc06ptp java-8]# systemctl show --property=Environment docker
Environment=HTTP_PROXY=http://host:port
if above is empty
create this file
/etc/systemd/system/docker.service.d/http-proxy.conf
with this entry
[Service]
Environment=“HTTP_PROXY=http://host:port”
or
/etc/systemd/system/docker.service.d/https-proxy.conf
with this entry
[Service]
Environment=“HTTPS_PROXY=http://host:port”
PS C:\Windows\system32> docker run hello-world
Unable to find image ‘hello-world:latest’ locally
C:\Program Files\Docker\Docker\Resources\bin\docker.exe: Error response from daemon: Get https://registry-1.docker.io/v2/: Not Found.
See ‘C:\Program Files\Docker\Docker\Resources\bin\docker.exe run --help’.
It didn’t work out for me. I am working on Ubuntu wsl(docker windows), try to run the docker login command on hyperV after eval command. Getting this below error:
ubuntu2993@user-PC:~/.docker$ docker login
Authenticating with existing credentials…
Login did not succeed, error: 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)
Login with your Docker ID to push and pull images from Docker Hub. If you don’t have a Docker ID, head over to https://hub.docker.com to create one.
Username (*****): *******
Password:
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)
ubuntu2993@user-PC:~/.docker$
I am new in proxy work, so I am not sure how to set proxy on hyper-v windows 10 virtual vm?
How do we decide what should be username, password and proxy address and port?
I have the same problem. I’m at home, on my own laptop. No VPN, no proxy, and I even tried turning off Windows Defender completely - still with the same result.
The login part was what worked for me to run docker run hello-world. I just installed Docker on a corporate PC with Windows10 with permanent admin rights: Thanks a lot.
Same with me. I tried setting windows environment variables first and restart docker. That didn’t work. I have to use proxy setting in Docker -> Settings -> Proxy to make it work.