Docker run hello-world results in an error

Hi i just installed docker on ubuntu following official instructions but when i run:

sudo docker run hello-world

I get the following error:

Unable to find image ‘hello-world:latest’ locally
docker: Error response from daemon: Get “https://registry-1.docker.io/v2/”: dial tcp 44.207.96.114:443: connect: no route to host.
See ‘docker run --help’.

I couldn’t find any similar error online.

Hi,

I pasted this:

https://registry-1.docker.io/v2/

onto my FireFox – ( where I have already signed into https://hub.docker.com/ ), I got this response:

{"errors":[{"code":"UNAUTHORIZED","message":"authentication required","detail":null}]}

On my Windows command prompt, I run:

F:\>docker search hello-world

I have:

F:\>docker search hello-world
NAME                                       DESCRIPTION                                     STARS     OFFICIAL   AUTOMATED
hello-world                                Hello World! (an example of minimal Dockeriz…   1808      [OK]
kitematic/hello-world-nginx                A light-weight nginx container that demonstr…   152
...

In my understanding, we should be able to pull and to run the hello-world image.

I don’t understand the problem that you currently have… Might be you have some network problems?

Or you could try:

$ sudo docker login

And login using the credentials for https://hub.docker.com/.

Then retry:

$ sudo docker run hello-world

again. I am not sure if this will work. But it does not take long to try.

Good luck :slight_smile: And please us posted.

1 Like

Some days ago one of my automated build failed because it could not access Docker Hub. It was a temporary error. It could also be the reason of the error if it works today. If not, then as @behai suggested, it could be an issue with your network.

One more important question. You mentioned that you installed Docker, but since Docker Desktop is avalable on Linux, it is not always clear when was Docker and when was Docker Desktop installed. So can you share a link to the instructions you used to install Docker?