Docker: Error response from daemon get https //registry-1.docker.io/v2/

Docker: Error response from daemon get https //registry-1.docker.io/v2/

This tutorial guides you on how to resolve docker Error response from daemon: Get https //registry-1.docker.io/v2/: net http: request canceled while waiting for connection whenever trying to run docker run command to pull any new image and run container.

Docker: Error response from daemon get https //registry-1.docker.io/v2/

Docker: Error response from daemon get https //registry-1.docker.io/v2/

I got a new laptop from my company and connected to my home network. Then tried setting up Docker Desktop and Windows Subsystem for Linux for Windows 10.

After setting up docker desktop running on WSL, I was trying to pull MySQL instance from docker.io and start the instance by running the following docker run command.

$ docker run --name mysql -e MYSQL_ROOT_PASSWORD=root -d mysql:latest

The expectation was, the above command should pull MySQL image start the MySQL instance in a docker container. But I got the error response as shown below.

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.)
see 'docker run --help'

Fix: Error response from daemon get https //registry-1.docker.io/v2/

After some research on internet, I figured out that this issue is due to Docker getting itself to a weird state. When you docker environment is in this state, it cannot pull any image and start container for you.

Here is the suggestion to fix Error response from docker daemon: Get https //registry-1.docker.io/v2/: net http while trying to pull and start docker instance in local environment.

1: Restart Docker Service Environment

2: Refresh your docker environment settings

After going through the suggestions the following did the trick for me. What I did was, I just restarted docker service and tried running the docker run command again. And it finally worked.

Hope it will be helpful 🙂

References

Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments