Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ECR] [Tags]: immutable image tags #169

Closed
jtoberon opened this issue Feb 20, 2019 · 9 comments
Closed

[ECR] [Tags]: immutable image tags #169

jtoberon opened this issue Feb 20, 2019 · 9 comments
Labels
ECR Amazon Elastic Container Registry

Comments

@jtoberon
Copy link

jtoberon commented Feb 20, 2019

After an image tag is pushed to a repository, prevent a user from pushing an update that points the tag to a different image. This feature can be used to ensure that an image tag such as "2.1.1" refers to the same content over time. Such tags can be easier to use than the longer image digest.

An example of the pros and cons of using mutable image tags can be found here.

@rpnguyen
Copy link
Contributor

🎉 https://aws.amazon.com/about-aws/whats-new/2019/07/amazon-ecr-now-supports-immutable-image-tags/

@jtoberon jtoberon closed this as completed Aug 1, 2019
@yrsurya
Copy link

yrsurya commented Jan 30, 2020

Hello all , we create two tags for the image where one is latest and another is Jenkins build number but with recently released tag immutability where we enabled for repo seems to be latest tag is not being tagged to the recent image as it not able to overwrite . Any one faced similar situation

@FernandoMiguel
Copy link

@yrsurya that's the all point if immutable tags.
Your latest tag is just like any other tag (it has no special meaning) and now refers to the 1st image it tagged

@yrsurya
Copy link

yrsurya commented Jan 30, 2020

I was in a impression that image which pushed recently will be getting latest tag by default. Is there any way we can get that(latest) by default after enabling immutable option on ECR as we use latest tagged base images for the application to built on top of

FROM xxxxxxxx.dkr.ecr.us-east-1.amazonaws.com/corretto11:latest
VOLUME ["/tmp"]
ADD ${project.name}-${version}.jar /
EXPOSE 8080
ENTRYPOINT [xxx]

@philipp-paland
Copy link

philipp-paland commented Jan 31, 2020

@yrsurya You could use the cli to untag latest before tagging your new image.

https://docs.aws.amazon.com/cli/latest/reference/ecr/untag-resource.html

@Roberdvs
Copy link

Nexus now allows redeploying the 'latest' tag even if tag immutability is enabled, which is very convenient.
image

Having the same on ECR would be nice.

@mike-stewart
Copy link

We have the same issue with the latest tag. I've opened a new issue in #878.

@pablote
Copy link

pablote commented Jun 25, 2020

The link @therealppa suggests is not working for me. Is it possible that it refers to some other type of tags, like aws resource tags, but not really docker container image tags?

@philipp-paland
Copy link

@pablote Looking at the description, you're probably right. According to https://stackoverflow.com/questions/56299191/remove-tag-from-image the correct command should be aws ecr batch-delete-image --repository-name <REPO NAME> --image-ids imageTag=<TAG NAME>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ECR Amazon Elastic Container Registry
Projects
None yet
Development

No branches or pull requests

8 participants