docker 无法使用ctr提取图像

oalqel3c  于 2023-03-07  发布在  Docker
关注(0)|答案(1)|浏览(396)

我将一个Docker映像加载到我的K3集群,如下所示:

# ctr -n k8s.io -a /run/k3s/containerd/containerd.sock image import /home/rocky/myawx-v1.0.0.tar

(实际上我已经尝试了许多不同版本的上述命令)
我可以在这里看到图像:

# k3s ctr image ls | grep awx
docker.io/library/myawx:v1.0.0 application/vnd.docker.distribution.manifest.v2+json sha256:7...9 617.3 MiB linux/amd64 io.cri-containerd.image=managed
quay.io/ansible/awx-ee:latest application/vnd.docker.distribution.manifest.v2+json sha256:5...0 613.4 MiB linux/amd64 io.cri-containerd.image=managed
quay.io/ansible/awx-ee@sha256:5...0 application/vnd.docker.distribution.manifest.v2+json sha256:5...0 613.4 MiB linux/amd64 io.cri-containerd.image=managed```

但如果我尝试提取图像,我会得到这个错误:

# k3s ctr image pull docker.io/library/myawx:v1.0.0
docker.io/library/myawx:v1.0.0: resolving      |--------------------------------------|
elapsed: 0.5 s                  total:   0.0 B (0.0 B/s)
INFO[0000] trying next host                              error="pull access denied, repository does not exist or may require authorization: server message: 
insufficient_scope: authorization failed" host=registry-1.docker.io
ctr: failed to resolve reference "docker.io/library/myawx:v1.0.0": pull access denied, 
repository does not exist or may require authorization: server message: 
insufficient_scope: authorization failed

如果我试着运行图像我得到这个...

# k3s ctr run docker.io/library/myawx myawx-run
ctr: image "docker.io/library/myawx": not found

我不知道我在做什么,我只是在抓救命稻草。请帮帮我!

flseospp

flseospp1#

k3s ctr image ls | grep awx只是告诉你镜像是本地加载的(不是注册表)。在下一个命令中,当你执行k3s ctr image pull..k3s ctr image run时,你实际上期望镜像从远程注册表中被拉下。
docker.io/library/myawx:v1.0.0对我来说看起来像是要去docker注册表,而不是你想要的注册表。

相关问题