Dial TCP lookup registry-1.docker.io temporary failure in name resolution Error

Dial TCP lookup registry-1.docker.io temporary failure in name resolution Error [SOLVED]

Docker service is running, I am trying to run a docker run hello-world, it is showing a strange error message – temporary name resolution error

Docker name resolution Error

After spending a few hours, found the problem is with name resolution from the OS itself.

# docker run hello-world
Trying to pull repository docker.io/library/hello-world ...
/usr/bin/docker-current: Get https://registry-1.docker.io/v2/:
 dial tcp: lookup registry-1.docker.io on
 read udp> i/o timeout.
See '/usr/bin/docker-current run --help'.
Solution: Add a working DNS IP address to resolv.conf

Solution for Docker name resolution Error:

Docker daemon is telling us that, it cannot reach the docker registry, we can check whether the internet and DNS service is available. I found my default DNS entry was not able to provide DNS service (by simply doing a test ping google.com ). Problem solved by adding and are DNS service IP address from Google

# cat /etc/resolv.conf

Verifying docker run

Let us try running a Hello World again

# docker run hello-world
Unable to find image 'hello-world:latest' locally
Trying to pull repository docker.io/library/hello-world ...
latest: Pulling from docker.io/library/hello-world
1b392d010123: Pull complete
Digest: sha256:451ce111d12222c5df2a32c85e5a03d52cbcef6ac3586dd03075f3034f99dbca
Status: Downloaded newer image for docker.io/hello-world:latest

Hello from Docker!
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
3. The Docker daemon created a new container from that image which runs the
    executable that produces the output you are currently reading.
4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.

To try something more ambitious, you can run an Ubuntu container with:
$ docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker ID:

For more examples and ideas, visit:

My system is CentOS 7, this should work in RHEL also

# cat /etc/redhat-release
CentOS Linux release 7.6.1810 (Core)