【问题标题】:How to pull image from a private repository using containerd?如何使用 containerd 从私有存储库中提取图像?
【发布时间】:2022-06-24 08:06:02
【问题描述】:

如何使用 containerd 从私有仓库拉取镜像?

我使用以下 containerd 命令从私有存储库中提取图像,但失败并显示以下错误消息。

sudo crictl pull qtech/graphql:latest

FATA[0002] pulling image: rpc error: code = Unknown desc = failed to pull and unpack image "docker.io/qtech/graphql:latest": failed to resolve reference "docker.io/qtech/graphql:latest": pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed

我确实使用我的 docker 凭据登录并成功提取了相同的图像。

azureuser@zk-master:~$ sudo docker login
Login with your Docker ID to push and pull images from Docker Hub. If you don't have a Docker ID, head over to https://hub.docker.com to create one.
Username: qtech
Password: 
WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store

Login Succeeded


azureuser@zk-master:~$ sudo docker pull qtech/graphql:latest
latest: Pulling from qtech/graphql
40e059520d19: Pull complete 
e640ca4424de: Pull complete 
3ee146eff338: Pull complete 
7a51ccd0399b: Pull complete 
c49798e0169e: Pull complete 
519f1a159b82: Pull complete 
6200637fe07c: Pull complete 
5789d71f6f43: Pull complete 
Digest: sha256:186ba59f4d3ccb03fd84888fc33aa12a8854f23e566c6e5a870ef7a43c3fb1f1
Status: Downloaded newer image for qtech/graphql:latest
docker.io/qtech/graphql:latest
azureuser@zk-master:~$

但 containerd 在运行时似乎没有获取这些凭据。

那么如何使用 containerd 从私有仓库拉取镜像呢?

【问题讨论】:

    标签: containerd containerdctl


    【解决方案1】:

    这对我有用:

    crictl pull --creds "UserName:Password" "image details from private registry@SHA details"

    【讨论】:

      猜你喜欢
      • 2022-12-06
      • 2017-07-05
      • 2021-04-11
      • 1970-01-01
      • 2020-11-02
      • 1970-01-01
      • 2021-12-10
      • 1970-01-01
      • 2018-05-20
      相关资源
      最近更新 更多