GoogleCloudPlatform / gcr-cleaner

Delete untagged image refs in Google Container Registry or Artifact Registry
Apache License 2.0
805 stars 112 forks source link

Add a dry-run flag #34

Closed forestoden closed 3 years ago

forestoden commented 3 years ago

It would be useful to have a dry-run flag of some form that will scan the repo and print out the list of images that it would prune without actually pruning. This would be valuable when initially setting this up to ensure that you have not misconfigured one of the fields. A misconfiguration could result in deleting images used in Production which would not be good.

Example

gcr-cleaner-cli -repo gcr.io/my-repo -dry-run