简体   繁体   中英

Docker unable to find image locally

I'm new to Docker. I installed it a few days ago and tried to follow through with the Docker Orientation and Setup as well as the quick start guide that opens automatically when you install the Docker Desktop App.

The orientation and setup suggests that that this is the output one should get when I run the code:

$ docker run hello-world

    Unable to find image 'hello-world:latest' locally
    latest: Pulling from library/hello-world
    ca4f61b1923c: Pull complete
    Digest: sha256:ca0eeb6fb05351dfc8759c20733c91def84cb8007aa89a5bf606bc8b315b9fc7
    Status: Downloaded newer image for hello-world:latest

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

I'm assuming that if it is unable to find a given image it automatically pulls it and makes it available. However, this is what I'm getting:

$ docker run hello-world
Unable to find image 'hello-world:latest' locally
docker: Error response from daemon: Get https://registry-1.docker.io/v2/: dial tcp: look
up registry-1.docker.io: no such host.
See 'docker run --help'.

I tried switching from Linux containers to Windows containers but it doesn't solve the problem. I can't seem to find any help online. What could be the problem?

你有没有试过再次运行相同的图像,它不会给你同样的按摩,所以每当你使用 run 或 pull docker command ,docker 在本地搜索图像然后它转到 dockerhub。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM