Browse Source

Support repository/image

master
Ricardo Branco 6 years ago
parent
commit
f80c9ea405
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      clean_registry.py

+ 3
- 3
clean_registry.py View File

@@ -11,7 +11,7 @@
11 11
 #   - This script may run stand-alone (on local setups) or dockerized (which supports remote Docker setups).
12 12
 #   - This script is Python 3 only.
13 13
 #
14
-# v1.1 by Ricardo Branco
14
+# v1.2 by Ricardo Branco
15 15
 #
16 16
 # MIT License
17 17
 #
@@ -40,7 +40,7 @@ try:
40 40
 except ImportError:
41 41
     error("Please install PyYaml with: pip3 install pyyaml")
42 42
 
43
-VERSION = "1.1"
43
+VERSION = "1.2"
44 44
 
45 45
 
46 46
 def dockerized():
@@ -189,7 +189,7 @@ class RegistryCleaner():
189 189
         if self.container is not None:
190 190
             self.docker.api.stop(self.container)
191 191
 
192
-        images = args.images if args.images else os.listdir(".")
192
+        images = args.images if args.images else map(os.path.dirname, iglob("**/_manifests", recursive=True))
193 193
 
194 194
         rc = 0
195 195
         for image in images:

Loading…
Cancel
Save