1

当我尝试从 ECR 中提取 docker 映像时,出现以下错误:

Get https://3242344.dkr.ecr.ap-south-1.amazonaws.imagename/latest: no basic auth credentials

Docker 服务运行良好,我可以列出存储库。

4

2 回答 2

2

首先,您需要验证您的 Docker 登录到 Amazon ECR:

aws ecr get-login --region <<region>> --no-include-email

有关 Amazon ECR Registries 身份验证的信息,请参阅以下链接: https ://docs.aws.amazon.com/AmazonECR/latest/userguide/Registries.html#registry_auth

使用以下命令在存储库中描述您的图像:

aws ecr describe-images --repository-name amazonlinux

使用以下命令拉取图像:

docker pull aws_account_id.dkr.ecr.us-west-2.amazonaws.com/amazonlinux:latest

有关更多信息,请参阅以下链接: https ://docs.aws.amazon.com/AmazonECR/latest/userguide/docker-pull-ecr-image.html

于 2019-04-23T12:37:18.933 回答
0

您需要docker login使用 AWS CLI 检索命令

$(aws ecr get-login --no-include-email --region <your region>)

Amazon ECR 入门中的更多信息。

于 2019-04-23T12:06:49.033 回答