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
preguntada hace un año438 visualizaciones
2 Respuestas
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

respondido hace un año
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
EXPERTO
respondido hace un año

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas