Docker push to ECR failing

0

Trying to learn ECR\ECS. I created a basic Web Site and built a Docker Image from it. I then tested it externally and it displays the Hello World page. Having an issue trying to push to my Docker Image to my Repository located in ECR which I confirmed is there. See below

[ec2-user@ip-172-X-X-X ~]$ docker images REPOSITORY TAG IMAGE ID CREATED SIZE XXXXXXXXXX.dkr.ecr.region.amazonaws.com/hello-world latest c9600a72d527 2 days ago 205MB hello-world latest c9600a72d527 2 days ago 205MB public.ecr.aws/docker/library/ubuntu 18.04 f9a80a55f492 4 months ago 63.2MB

[ec2-user@ip-172-X-X-X ~]$ docker push XXXXXXXX.dkr.ecr.us-east-1.amazonaws.com/hello-world:latest The push refers to repository [584817139776.dkr.ecr.us-east-1.amazonaws.com/hello-world] An image does not exist locally with the tag: 584817139776.dkr.ecr.us-east-1.amazonaws.com/hello-world

TJ
已提问 7 个月前322 查看次数
2 回答
0

Did you tag your image before trying to push to ECR? The error leads me to think you forgot to tag the image before pushing https://docs.aws.amazon.com/AmazonECR/latest/userguide/docker-push-ecr-image.html#:~:text=Tag%20your%20image%20with%20the%20Amazon%20ECR%20registry%2C

Below are the steps to push an image to ECR: https://docs.aws.amazon.com/AmazonECR/latest/userguide/docker-push-ecr-image.html

已回答 7 个月前
0

Looking at the error message, I can see that it is informing that the image 584817139776.dkr.ecr.us-east-1.amazonaws.com/hello-world:latest is not available locally and this is a requirement.

Checking the command above the error message, I could see that the image URI is a bit different. It is showing dkr.ecr.region instead of dkr.ecr.us-east-1.

I'd recommend you to use docker tag command to rename the image to use the expected URI.

profile pictureAWS
已回答 7 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则