amazon-web-services - 登录私有(private)注册表时出现 aws ecs 403 错误

标签 amazon-web-services docker amazon-ecs

我正在尝试使用 ECS 登录 Quay。
Quay 是一个私有(private)的注册 docker。

我遵循了这个文档,但我也有一个 403 错误:“{\”error\":\"Permission Denied\"}"。

我把这段代码放在 /etc/ecs/ecs.config :

ECS_ENGINE_AUTH_TYPE=docker
ECS_ENGINE_AUTH_DATA={"https://quay.io/": { "username": "xxxxxx","password":"xxxxx","email": "."}}

而且我已经重新启动了 ecs 服务,但它不起作用。

你有想法吗?

最佳答案

The documentation指出 /etc/ecs/ecs.conf 的内容略有不同:

ECS_ENGINE_AUTH_TYPE=dockercfg
ECS_ENGINE_AUTH_DATA={"https://quay.io": {"auth": "YOURAUTHTOKENFROMDOCKERCFG", "email": "user@example.com"}}
它使用 dockercfg和一个 token 而不是用户名/密码。dockercfg在文档页面“I'm authorized but I'm still getting 403s”中进行了描述

docker stores the credentials it uses for push and pull in a file typically placed at $HOME/.dockercfg.

If you are executing docker in another environment (scripted docker build, virtual machine, makefile, virtualenv, etc), docker will not be able to find the .dockercfg file and will fail.


作为OP Mathieu Perochon评论 below ,这也与 Amazon Machine Image 的环境版本相关联:

I have upgrade my AMI (Amazon ECS-Optimized Amazon Linux) and it's working

关于amazon-web-services - 登录私有(private)注册表时出现 aws ecs 403 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37339826/

相关文章:

php - Docker : There are no commands defined in the "setup" namespace 上的 magento2 错误

amazon-web-services - "latest"标签如何在 ECS 任务定义和从 ECR 拉取的容器实例中工作?

amazon-iam - AWS CDK - 如何将访问 key secret 和 secret key ID 作为环境参数传递给容器

angularjs - 通过 AWS CloudFormation 配置资源以部署 React(MERN)/Angular(MEAN) 应用程序

ruby - S3 预签名帖子需要特定的内容类型

php - 使用 SQS 在 PHP (Symfony2) 上发送数千个通知

python - 如何判断我的 AWS EC2 实例是否受 Amazon-EBS 支持?

javascript - Nestjs/TypeORM无法连接到Docker MariaDB

Docker 容器使用不同的工具显示不同的 CPU 使用率

amazon-web-services - 使用 ECS-CLI 将多容器 docker 应用程序部署到 AWS ECS Fargate