Example 2

ARTIFACTORY: Docker Max Unique Tags and Retention Policies - Practical Guide

AuthorFullName__c
Kayvan Sofastaee
articleNumber
000006117
ft:sourceType
Salesforce
FirstPublishedDate
2024-06-05T08:33:29Z
lastModifiedDate
2024-06-05
VersionNumber
2
When configuring the Docker Local Repository as follows:

Max Unique Tags: 3
Docker Tag Retention: 2

User-added image



For this example, we will assign two different tags to images and then push three images for each tag to initiate the Retention process.

User-added image

In this setup, each tag is associated with its own Sha256 retention values, allowing a maximum of two Sha256 retention values per tag. With two tags in use, this results in a total of four Sha256 values. However, upon pushing an additional image (whether under tag 2.0 or 2.1), one of the existing Sha256 values will be removed. This reduction leaves us with three remaining Sha256 retention values. The Sha256 of the newly pushed image is then recorded in the manifest.json file corresponding to that specific tag, maintaining the updated retention count.

User-added image


Overall, the main implication of applying both Max Unique Tags and Tag Retention together is that Max unique tags take precedence and will remove all retention revisions associated with the current tag if it is being deleted by the logic. This means that if a tag is removed due to exceeding the Max Unique Tags limit (being the oldest unique tag when a new one has been pushed), all of its Tag Retention copies will be removed as well.

Please Note: There are limitations as well with the Tag Retention Logic - reference:
https://jfrog.com/help/r/jfrog-artifactory-documentation/limitations-of-tag-retention-logic 

Reference: For more in depth information regarding the Tag Retention Logic please refer to our documentation:
https://jfrog.com/help/r/jfrog-artifactory-documentation/tag-retention-logic