Browse Source

Update README.md

master
Ricardo Branco 6 years ago
parent
commit
23cfdfa8f7
1 changed files with 23 additions and 1 deletions
  1. 23
    1
      README.md

+ 23
- 1
README.md View File

@@ -1,2 +1,24 @@
1 1
 # clean_registry
2
-Clean the Docker Registry by removing untagged repositories. The optional flag -x may be used to remove repositories or tagged images
2
+Clean the Docker Registry by removing untagged repositories and running the garbage collector in Docker Registry >= 2.4.0
3
+
4
+The optional `-x` flag may be used to remove the specified repositories or tagged images.
5
+
6
+NOTES:
7
+  - This script stops the Registry container during cleanup to prevent corruption, making it temporarily unavailable to clients.
8
+  - This script assumes local storage (the filesystem storage driver).
9
+  - This script may run standalone or dockerized.  To run standalone, you must install **docker-py** with `pip3 install docker` and **pyyaml** with `pip3 install pyyaml`.
10
+  - This script is Python 3 only.
11
+  
12
+## Usage:
13
+
14
+```
15
+clean_registry.py [OPTIONS] CONTAINER [REPOSITORY[:TAG]]...`
16
+Options:
17
+        -x, --remove    Remove the specified images or repositories.
18
+        -q, --quiet     Supress non-error messages.
19
+        -V, --version   Show version and exit.
20
+```
21
+
22
+## Docker usage:
23
+
24
+`docker run --rm --volumes-from CONTAINER ricardobranco/clean_registry [OPTIONS] CONTAINER [REPOSITORY[:TAG]]...`

Loading…
Cancel
Save