我是Docker的新手。我几天前安装了它,并试图按照Docker Orientation and Setup以及安装Docker桌面应用程序时自动打开的快速入门指南进行操作。
方向和设置表明这是我运行代码时应获得的输出:
$ 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.
...
我假设,如果找不到给定的图像,它将自动将其拉出并使其可用。但是,这就是我得到的:
$ 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'.
我尝试从Linux容器切换到Windows容器,但不能解决问题。我似乎无法在网上找到任何帮助。可能是什么问题?
答案 0 :(得分:0)
你有没有试过再次运行相同的图像,它不会给你同样的按摩,所以每当你使用 run 或 pull docker 命令时,docker 在本地搜索图像然后它转到 dockerhub。