Unable to push docker image to ECR

0

While trying to push a docker image to a ECR repository, I get the following message:

The push refers to repository [<repository-location-and-name>] 5f56c5378ae9: Retrying in 1 second 6153a9b1f580: Retrying in 1 second a3f7911df18a: Retrying in 1 second 874448b54658: Retrying in 1 second 100796cdf3b1: Retrying in 1 second 54acb5a6fa0b: Retrying in 10 seconds 8d51c618126f: Retrying in 1 second 9ff6e4d46744: Retrying in 1 second a89d1d47b5a1: Retrying in 4 seconds 655ed1b7a428: Waiting EOF

And no further errors are displayed. From Stack Overflow answers, I figured it could be a permission problem. Then I went to AWS docs. for ECS, and found the following documentation: https://docs.aws.amazon.com/AmazonECR/latest/userguide/image-push.html

Even after making the settings as per the documentation, I get the same result.

Could you please suggest what needs to be tweaked? It's kind of urgent.

Thanks much.

  • These are my 'Actions' settings in the policy statement:

    ecr-public:BatchCheckLayerAvailability ecr-public:CompleteLayerUpload ecr-public:InitiateLayerUpload ecr-public:PutImage ecr-public:UploadLayerPart

    Am I missing anything?

    Thanks.

rvenkat
gefragt vor 2 Jahren14596 Aufrufe
3 Antworten
1

Have you tried this before build and push?

aws ecr get-login-password --region ${REGION} | docker login --username AWS --password-stdin ${AWS_ACCOUNT_ID}.dkr.ecr.${REGION}.amazonaws.com
hai
beantwortet vor 2 Jahren
1

Is the repository public or private since the policy you have quoted above is for a public repository. If you have private repository, the policies should be ecr:xxx and not ecr-public:xxx

profile picture
Syd
beantwortet vor 2 Jahren
1

Thanks so much for the responses!

When I changed the region for the ECR and pushed the image, it worked! I am not sure why a region would make a difference.

Now I have my Image->ECR->ECS->Cluster up and running. Thanks!

rvenkat
beantwortet vor 2 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen