Skip to content

ECR is not storing tags for pushed images

0

I'm trying to push a Docker image to ECR with a command like the following (edited to remove personal information)

docker push ACCOUNT_ID.dkr.ecr.us-east-2.amazonaws.com/MY_IMAGE/NAME:TAG

However, when I view the image in the ECR console, the tag shows up as a dash (-). The CloudTrail event doesn't show any imageTag attribute in requestParameters, though I do see that in older PutImage events. When I try to pull the image with the tag I used when I pushed it, ECR reports that the image doesn't exist.

Is this somehow user error, or is this a regression in ECR? At the time of writing, https://health.aws.amazon.com/health/status doesn't report any ongoing issues with ECR or any other services.

asked a year ago512 views

1 Answer
-1

This appears to be an issue with how your image is being pushed to ECR. When pushing Docker images to Amazon ECR, the tag should be properly applied and visible in the ECR console.

When you push an image to ECR using the format ACCOUNT_ID.dkr.ecr.us-east-2.amazonaws.com/MY_IMAGE/NAME:TAG, the tag (in this case "TAG") should be stored and visible in the ECR console. If you're seeing a dash instead, something is going wrong with the tagging process.

Here are some things to check:

  1. Verify that your Docker image is correctly tagged locally before pushing. You can use docker images to confirm.

  2. Make sure you're authenticated to the ECR registry using the AWS CLI before pushing.

  3. Check that the repository exists in ECR before pushing. The repository must exist before you can push images to it.

  4. If you omit the image tag when pushing, ECR assumes the tag is "latest" by default, but it shouldn't show as a dash.

  5. When an image is successfully pushed to ECR, an EventBridge event is generated with details including the image tag. You might want to check if these events are being properly generated.

Also, be aware that when pulling images, there's a difference between pulling by tag versus pulling by digest. If you're trying to pull by digest but using a tag format, that could explain why ECR reports the image doesn't exist.

If you've verified all these steps and the issue persists, it could potentially be a service issue. In that case, you might want to contact AWS Support for further assistance.
Sources
Amazon ECR events and EventBridge - Amazon ECR
Pushing a Docker image to an Amazon ECR private repository - Amazon ECR
Container image manifest formats in Amazon ECR public - Amazon ECR Public

answered a year ago

  • The image is tagged correctly, otherwise I couldn't push it.

    I'm authenticated, otherwise the push wouldn't succeed.

    The repository exists, otherwise the push wouldn't succeed.

    I did not omit the tag; see the command I used to push it.

    I'm not trying to pull the image by digest; I'm trying to pull exactly the same image name/tag that I pushed to ECR.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.