Cannot run hello-world

With Docker version 18.06.1-ce, build e68fc7a, docker-compose version 1.22.0, build f46880f, and docker-machine version 0.15.0, build b48dc28d installed under macOS 10.13.6, and with Docker.app running and my being logged in there…

In Terminal

docker run hello-world

give response:

Unable to find image 'hello-world:latest' locally
docker: 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’.

I found nothing to help when I did run the “help” command. What should I do now?

(I got similar no-go from “docker run -d -p 80:80 --name webserver nginx”.)

Hi :slight_smile:

Are you maybe behind a proxy?
If you are, Docker uses the HTTP_PROXY env to read proxy settings.

No, I’m not behind a proxy.

This seems like your node is unable to reach the Docker Hub. Please check out the following article to see if anything there resolves the issue: https://success.docker.com/article/i-cant-reach-docker-hub-from-my-home-network

I can reach the hub from within Safari, and the suggested nslookup command gave server sddress 208.67.222.222. Now what?

Aha! Instead of using Docker.app to sign in, I ran “docker login” in Terminal and was able there to log in and to retrieve and run the hello-world image.

Should it be necessary to do that login in Terminal if i do it in Docker.app? (Evidently, I’m confused by the very fundamentals here.)