Elastic Container Registry is an AWS service that allow us to store docker container images for different proposes. Each container repository may have multiple versions with multiple tags. We can identify the purpose of each tag by the prefix:
“st” prefix are tags that were created to staging environments by the workflow. “pr” prefix are tags that were created to production environments. The following steps explain the process to create and configure those repositories.
Requirements
Access to create and edit Repositories in ECR Procedure
Go to ECR AWS web and create the repository you want to store. Now we have to create a lifecycle police to delete the old and unnecessary versions. To do that, select the repository and in the top list actions, select lifecycle polices. We have to create two polices for each prefix that have been explained before.