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/
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 🙂
- How to Explore Docker Container’s File System ?
- Docker EXPOSE Port only to the Host on Google Cloud
- Get Docker Container’s IP Address from the Host
- Copy Files between Host and Docker Container
- Install Anthos Service Mesh (Istio) on GKE Kubernetes Cluster ?
- kubectl unable to connect to server: x509: certificate signed by unknown authority
- How to list all Containers running in Kubernetes Pod ?
- List all kafka topics using kafka testclient ?
- Google cloud shell command to get the default PROJECT_ID – GCP
- How to remove an image tag from docker hub ?
- Build a Docker Image with a Dockerfile and Cloud Build in GCP?
- How to create GCP project on Google Cloud Platform
- MariaDB – How to set max_connections permanently ?
- View Kafka messages using kafka testclient ?
- What is ImagePullBackOff status on a Kubernetes pod ?
- List all kafka topics using kafka testclient
- Delete docker repository from the docker hub
- Replication factor: 1 larger than available brokers: 0 – Create Kafka Topic
- Docker: Copy files from Docker container to local host
- docker: Error response from daemon: Resolved