Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error response from daemon: Get https://registry-1.docker.io/v2/: dial tcp: lookup registry-1.docker.io on 192.168.65.1:53: no such host

I am new to dockers. When I am running the docker pull sonarqube I am getting the following error.

Error response from daemon: Get https://registry-1.docker.io/v2/: dial TCP: lookup registry-1.docker.io on 192.168.65.1:53: no such host

Can you please let me know why I am getting the error and how can I rectify this.

like image 695
rohit Avatar asked Nov 30 '17 18:11

rohit


People also ask

What is https registry 1 Docker io?

"https://registry-1.docker.io"] # ... As for where registry-1.docker.io comes from, it's the DNS name for the Docker Hub registry, which is the default when you do not specify a registry in your image name.

What is the default registry for Docker?

Docker Hub is Docker's official cloud-based registry for Docker images. As you might expect, since Docker Hub is Docker's official registry, it is the default registry when you install Docker.

Where is Docker registry stored?

The Docker Registry configuration is defined inside of /etc/registry/config. yml . With the default configuration the registry listens on ports 5000 and stores the Docker images under /var/lib/docker-registry .


2 Answers

I had similar issue on Ubuntu 16.04 and manage to solve it by adding more nameservers

You can try too.

  1. Open config file sudo nano /etc/resolv.conf and add the following under existing nameservers

    nameserver 8.8.8.8

    nameserver 8.8.4.4

  2. run following commands to restart daemon and docker service

    sudo systemctl daemon-reload

    sudo systemctl restart docker

Now try to pull image you want docker pull sonarqube

like image 192
lev09 Avatar answered Sep 23 '22 07:09

lev09


In my case on a Mac, only a restart of the docker-machine did the work:

docker-machine restart 

Uninstalling docker did not work! Just the above restart is enough!

like image 25
cyberPrivacy Avatar answered Sep 24 '22 07:09

cyberPrivacy