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
posta un anno fa438 visualizzazioni
2 Risposte
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

con risposta un anno fa
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
ESPERTO
con risposta un anno fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande