docker - Docker 无法在本地找到图像
问题描述
我是 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 容器,但并没有解决问题。我似乎无法在网上找到任何帮助。可能是什么问题呢?
解决方案
你有没有尝试过再次运行相同的图像,它不会给你同样的按摩,所以每当你使用 run 或 pull docker 命令时,docker 会在本地搜索图像,然后它会转到 dockerhub。
推荐阅读
- flutter - “未找到:'dart:js' export 'dart:js' show allowInterop, allowInteropCaptureThis”运行测试时出错
- node.js - 使用通配符仅提取一种类型的数据
- laravel - 使用 Laravel Mix Vue 编译时出错
- python - 在后台加载新模型
- python - 从文本文件 Python 计算重复有效负载
- opencv - 将跨图像边框的轮廓分成线条
- awk - 如何在等号后用awk在引号中提取数字
- flutter - 从其他屏幕按下时,如何在 Flutter 的未来方法中传递字符串参数?
- python - 对许多打印结果 - 输入 dict
- batch-file - 按供应商搜索软件到 CSV 文件的批处理脚本