【发布时间】:2020-12-15 14:14:39
【问题描述】:
我正在运行与 Podman 一起打包的 Fedora CoreOS 的气隙环境中工作。我有几个容器图像,我一直在努力将它们传输到气隙环境中。为了做到这一点,我遵循了以下步骤:
- 我在一台可以访问互联网的机器上获取图像。一些图像是使用
podman pull docker-daemon:docker.io/my-example-image:latest从我的 Docker 注册表中提取到 Podman 中的,而另一些是使用podman pull直接从在线存储库中提取的。 - 我使用(例如)
podman save docker.io/my-example-image:latest -o my-example-image.tar将图像保存到 tar 文件 - 我将 tar 文件传输到物理介质上的气隙环境并使用
podman load -i my-example-image.tar加载它们
当我使用podman images 检查图像时,它们都出现在图像列表中。但是,如果我尝试从这些图像之一运行容器,使用 sudo podman run docker.io/my-example-image 我会收到一条很长的错误消息:
Trying to pull docker.io/my-example-image
Get "https://registry-1.docker.io/v2/": dial tcp: lookup registry-1.docker.io on [::1}:53: read udp [::1]:50762 ->
[::1]:53: read: connection refused
Error: unable to pull docker.io/my-example-image: Error initializing source docker://my-example-image:latest:
error pinging docker registry registry-1.docker.io: Get "https://registry-1.docker.io/v2/": dial tcp: lookup
registry-1.docker.io on [::1]:53: read udp [::1]50762 -> [::1]:53: read: connection refused
对于从其他存储库(例如 quay.io)获取的图像,我收到了类似的消息
在我看来,错误是由机器无法与注册表建立连接引起的,考虑到环境是气隙的,这对我来说是有意义的。但我不确定为什么 podman 甚至试图在它们已经存在于环境中的情况下提取这些图像,正如 podman images 所证实的那样。
我尝试过在podman run 命令中使用各种引用图像的方法,包括
sudo podman run docker.io/my-example-image:latest
sudo podman run my-example-image
sudo podman run my-example-image:latest
我已尝试寻找解决此问题的方法,但无济于事,非常感谢任何有关此问题的指导。
【问题讨论】:
标签: image containers coreos podman