From 44c290c0ed82738b8cc032af6de4cfb31d86bd4e Mon Sep 17 00:00:00 2001 From: wang yan Date: Tue, 19 Mar 2019 15:07:04 +0800 Subject: [PATCH] Enable docker registry to clean untagged revisions As registry v2.7.1 has introduced the possibility to clean untagged manifests, enable it in the registryctl api. Signed-off-by: wang yan --- src/registryctl/api/registry.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/registryctl/api/registry.go b/src/registryctl/api/registry.go index d834327d8..1cb20d926 100644 --- a/src/registryctl/api/registry.go +++ b/src/registryctl/api/registry.go @@ -38,7 +38,7 @@ type GCResult struct { // StartGC ... func StartGC(w http.ResponseWriter, r *http.Request) { - cmd := exec.Command("/bin/bash", "-c", "registry garbage-collect "+regConf) + cmd := exec.Command("/bin/bash", "-c", "registry garbage-collect --delete-untagged=true "+regConf) var outBuf, errBuf bytes.Buffer cmd.Stdout = &outBuf cmd.Stderr = &errBuf