我是在一个空隙的环境中工作,运行Fedora CoreOS,这是与Podman一起打包的。我有几个容器图像,我一直在努力运输到空隙环境中。为了做到这一点,我遵循了以下步骤:
podman pull.podman pull docker-daemon:docker.io/my-example-image:latest的在线存储库中提取的,这些映像使用podman save docker.io/my-example-image:latest -o my-example-image.tarpodman save docker.io/my-example-image:latest -o my-example-image.tarpodman 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
我曾试图寻求解决这个问题的办法,但没有任何效果,我非常希望就此提供任何指导。
发布于 2020-12-15 22:38:43
每个用户都有自己的容器存储。
用户根使用/var/lib//
普通用户使用目录~/..local/share/containers/
命令podman load -i my-example-image.tar将使用目录~/..local/share//
命令sudo podman run docker.io/my-example-image将使用目录/var/lib/containers
如果您希望在用户之间共享只读容器存储,请查看文件storage.conf中设置的附加内存。
[storage.options]
additionalimagestores = [ "/var/lib/mycontainers",]https://stackoverflow.com/questions/65307659
复制相似问题