无法使用 podman 推送到本地重新映射的注册表

时间:2021-03-04 02:37:35

标签: podman

使用 podman 3.0.1,我在 /etc/containers/registries.conf.d/500-insecure-registries.conf(我不是真的在使用 example.com;而是在那里有一个真实的域名):

[[registry]]
location = 'localhost:5000'
prefix = 'example.com'
insecure = true

我有一张被标记如下的图片:

podman tag docker.io/library/hello-world example.com/hello-world

但是当我尝试按如下方式推送图像时(打算使用 localhost 存储库):

podman push example.com/hello-world

我收到一个错误,表明它实际上是在尝试推送到 example.com 作为位置:

Error: error copying image to the remote destination: Error trying to reuse blob sha256:9c27e219663c25e0f28493790cc0b88bc973ba3b1686355f221c38a36978ac63 at destination: error pinging docker registry example.com: invalid status code from registry 404 (Not Found)

==================================

根据我在 https://www.redhat.com/sysadmin/manage-container-registries 的“重新映射引用”下阅读的内容,推送应该转到本地注册表...所以有人知道出了什么问题吗?

提前致谢!

1 个答案:

答案 0 :(得分:0)

当您标记图像时,目标名称是它将被推送到的注册表。如果您不想推送到“example.com”,请适当标记:

podman tag docker.io/library/hello-world <registry-server>/hello-world
相关问题