I am stuck at with the rollback strategies on Amazon ECS using Amazon ECR as docker registry. I want to maintain the latest 5 image versions(say latestv1 latestv2 latestv3 latestv4 latestv5 etc) and Want to rollback to latestv4 if the code on latestv5 fails.
I have tried using amazon ecr cli and It gives me the all of the unsorted tags.
aws ecr describe-images --repository-name api-gateway-demo --output json --query imageDetails[*].imageTags
Output:
[
[
"latestv2"
],
[
"latestv1"
],
[
"latestv5"
],
[
"latestv3"
],
[
"latestv4"
]
]
Any idea to manage the versioning of the images for better deployment/rollbacks on ECR?
From my experience the best scenario is to tag the image so you can rollback anytime from your registry private or not. https://docs.docker.com/engine/reference/commandline/tag/
Also this might help you Is there a way to tag a previous layer in a docker image or revert a commit?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With