Dockerrun.aws.json framework for ECR Repo

We are switching from the Docker Hub to ECR, and I'm curious how to structure the Dockerrun.aws.json file to use this image. I tried to change the name as <my_ECR_URL>/<repo_name>:<image_tag>, but it failed. I also saw the details of private registries using the authentication file in S3, but this does not seem to be the correct route when it aws ecr get-loginis the recommended authentication method using ECR.

Can someone tell me how I can use the ECR image in the Beanstalk Dockerrun.aws.json file?

If I look at the definition of an ECS task, an attribute is needed there com.amazonaws.ecs.capability.ecr-auth, but I do not set it anywhere in my file Dockerrun.aws.json, and I'm not sure what should be there. Perhaps this is an S3 bucket? Something is needed, since every time I try to run tasks created by the Elastic Beanstalk from ECS, I get:

Run tasks failed
Reasons : ATTRIBUTE

Any ideas are greatly appreciated.

Refresh I can see from some other threads that this happened with earlier versions of the ECS agent, but I am currently running Agent version 1.6.0and Docker version 1.7.1which I consider are recommended versions. Perhaps this is a problem with the Docker version?

+4
source share
4 answers

, , ECS 1.7, , . , , , - .

+6

, , IAM, , Elastic Beanstalk. , , Elastic Beanstalk, ​​ AmazonEC2ContainerRegistryReadOnly

: http://docs.aws.amazon.com/AmazonECR/latest/userguide/ECR_IAM_policies.html

+2

ECR ​​ 1.7.0 ECS.

+2

Elasticbeanstalk ECR . , AmazonEC2ContainerRegistryReadOnly

Docker AWS Amazon EC2 Container Registry (Amazon ECR). Docker Amazon ECR, Elastic Beanstalk Amazon ECR , Amazon (Amazon S3).

ECR Amazon . AmazonEC2ContainerRegistryReadOnly Amazon ECR , :

: http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_docker.container.console.html

+2

Source: https://habr.com/ru/post/1622150/


All Articles