Why do I get a daemon pull access denied error login incorrect or repo doesn't exist? I know the login is correct and the repository exists

huangapple go评论109阅读模式
英文:

Why do I get a daemon pull access denied error login incorrect or repo doesn't exist? I know the login is correct and the repository exists

问题

我试图执行以下命令来拉取一个Docker镜像:docker pull xxyy/sampledb,但是出现了以下错误:

守护程序的错误响应: xxyy/sampledb的拉取访问被拒绝,仓库不存在或可能需要 'docker login':请求的资源访问被拒绝

所以我知道仓库是存在的,因为当我运行aws ecr describe-images xxyy/sampledb时,它返回:

"imageDetails": [
    {
        "registryId": "123456789",
        "repositoryName": "xxyy/sampledb",
        "imageDigest": "sha256:26c8956921bc5b3530fea3de762a6b0891884fec2760",
        "imageTags": [
            "latest"
        ],
        "imageSizeInBytes": 5037757,
        "imagePushedAt": "2022-09-05T11:45:40+01:00",
        "imageManifestMediaType": "application/vnd.docker.distribution.manifest.v2+json",
        "artifactMediaType": "application/vnd.docker.container.image.v1+json",
        "lastRecordedPullTime": "2023-08-09T11:03:44.123000+01:00"
    },

我成功登录到AWS ECR,并且我知道我有正确的登录信息,因为登录的结尾是123456789.dkr.ecr.us-east-1.amazonaws.com

有任何关于为什么我会收到那个错误的想法吗?

英文:

I am trying to pull a docker image by executing: docker pull xxyy/sampledb but am getting the following error:

Error response from daemon: pull access denied for xxyy/sampledb, repository does not exist or may require 'docker login': denied: requested access to the resource is denied

So I know the repository exists, because when I run aws ecr describe-images xxyy/sampledb, it returns:

 "imageDetails": [
        {
            "registryId": "123456789",
            "repositoryName": "xxyy/sampledb",
            "imageDigest": "sha256:26c8956921bc5b3530fea3de762a6b0891884fec2760",
            "imageTags": [
                "latest"
            ],
            "imageSizeInBytes": 5037757,
            "imagePushedAt": "2022-09-05T11:45:40+01:00",
            "imageManifestMediaType": "application/vnd.docker.distribution.manifest.v2+json",
            "artifactMediaType": "application/vnd.docker.container.image.v1+json",
            "lastRecordedPullTime": "2023-08-09T11:03:44.123000+01:00"
        },

And I log into the aws erc successfully, and I know I have the right login, because the ending of the login is 123456789.dkr.ecr.us-east-1.amazonaws.com

Any ideas why I am being returned that error?

答案1

得分: 3

你的镜像拉取命令中缺少注册表名称。

如果你没有指定注册表,它将默认使用Docker Hub。

英文:

You're missing the registry name in your image pull.

docker pull 123456789.dkr.ecr.us-east-1.amazonaws.com/xxyy/sampledb

If you do not specify a registry, it will default to Docker Hub.

huangapple
  • 本文由 发表于 2023年8月11日 02:45:25
  • 转载请务必保留本文链接:https://go.coder-hub.com/76878556.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定