Note: Below is an example that is tested and working fine. This is a sample script for clearing docker images. Not ideal for all scenarios and is highly recommended to test in lower environments. The motive is only to help a few of the users who are interested in removing old images. This is not officially supported but can help users who are interested in scripting. There are a few other officially supported mechanisms available on JFrog confluence page/s.
If we have too many docker images in the Artifactory, it is quite difficult to manage them. It is always recommended to clean up unwanted images. Here, we are going to achieve this using a Python script that deletes docker images by matching names and patterns.
If we have too many docker images in the Artifactory, it is quite difficult to manage them. It is always recommended to clean up unwanted images. Here, we are going to achieve this using a Python script that deletes docker images by matching names and patterns.