用于ECR Repo的Dockerrun.aws.json结构 [英] Dockerrun.aws.json structure for ECR Repo

查看:124
本文介绍了用于ECR Repo的Dockerrun.aws.json结构的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在从Docker Hub切换到ECR,我很好奇如何构建Dockerrun.aws.json文件以使用此图像.我试图将名称修改为<my_ECR_URL>/<repo_name>:<image_tag>,但这并不成功.我还看到了在S3上使用身份验证文件的私有注册表的详细信息,但是当aws ecr get-login是使用ECR进行身份验证的推荐方法时,这似乎不是正确的路由.

We are switching from Docker Hub to ECR and I'm curious how to structure the Dockerrun.aws.json file to use this image. I attempted to modify the name as <my_ECR_URL>/<repo_name>:<image_tag> but this is not successful. I also saw the details of private registries using an authentication file on S3 but this doesn't seem like the correct route when aws ecr get-login is the recommended way to authenticate with ECR.

有人可以指出我如何在Beanstalk Dockerrun.aws.json文件中使用ECR图像吗?

Can anyone point me to how I can use an ECR image in a Beanstalk Dockerrun.aws.json file?

如果我查看ECS任务定义,则有一个称为com.amazonaws.ecs.capability.ecr-auth的必填属性,但是我没有在Dockerrun.aws.json文件中的任何位置设置该属性,并且不确定是否需要该属性.也许这是一个S3存储桶?每次我尝试从ECS运行Elastic Beanstalk创建的任务时,都需要做些什么:

If I look at the ECS Task Definition,there's a required attribute called com.amazonaws.ecs.capability.ecr-auth, but I'm not setting that anywhere in my Dockerrun.aws.json file and I'm not sure what needs to be there. Perhaps it is an S3 bucket? Something is needed as every time I try to run the Elastic Beanstalk created tasks from ECS, I get:

Run tasks failed
Reasons : ATTRIBUTE

任何见解都会受到赞赏.

Any insights are greatly appreciated.

更新我从其他一些线程中看到这曾经在早期版本的ECS代理中出现过,但是我目前正在运行Agent version 1.6.0Docker version 1.7.1,我认为这是推荐的版本. Docker版本可能有问题吗?

Update I see from some other threads that this used to occur with earlier versions of the ECS agent but I am currently running Agent version 1.6.0 and Docker version 1.7.1, which I believe are the recommended versions. Is this possibly an issue with the Docker version?

推荐答案

事实证明,ECS代理只能提取1.7版的图像,而这正是我的处境.更新代理可以解决我的问题,希望对其他人有所帮助.

So it turns out, the ECS agent was only able to pull images with version 1.7, and that's where mine was falling. Updating the agent resolves my issue, and hopefully it helps someone else.

这篇关于用于ECR Repo的Dockerrun.aws.json结构的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆