How do you manage container image tags and retention in a registry?
AdvancedConceptBuild Tools and Artifact Repositories
Answer
Tag with the commit SHA (immutable) and optionally SemVer tags for releases. Enable tag immutability where supported (ECR imageTagMutability=IMMUTABLE). Use lifecycle policies to expire untagged and old images, for example keep the last 30 tagged images or anything younger than 90 days, but never delete images referenced by running deployments or production release tags. Scan on push and replicate critical images to a second region.
aws ecr put-image-tag-mutability --repository-name shop/api --image-tag-mutability IMMUTABLE
More on Build Tools and Artifact Repositories
What is Maven and what is its build lifecycle?BeginnerWhat is the difference between `mvn package`, `install` and `deploy`?BeginnerHow do Maven dependency scopes and transitive dependencies work?IntermediateWhat is `settings.xml` in Maven and how do CI builds use it?IntermediateWhat is the Maven Wrapper and why use it?BeginnerHow do you cache dependencies and speed up Maven builds in CI?Intermediate