GoogleCloudPlatform / gcr-cleaner

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

Added the -recursive flag to load child repositories #37

Closed mmikitka closed 3 years ago

mmikitka commented 3 years ago

Say I have a repository tree structure like the following:

gcr.io/myproject/garden/garlic
gcr.io/myproject/garden/onions
gcr.io/myproject/bike/mountain

I want to run gcr-cleaner against all repositories without explicitly running the command against each one. This is currently not possible.

With the addition of the -recursive flag in this PR, I am now able to do:

Clean all repositories in gcr.io/myproject

gcr-cleaner-cli -repo gcr.io/myproject -recursive

Or, clean all garden repositories:

gcr-cleaner-cli -repo gcr.io/myproject/garden -recursive