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 <wangyan@vmware.com>
This commit is contained in:
wang yan 2019-03-19 15:07:04 +08:00
parent 9a1b5eac26
commit 44c290c0ed
1 changed files with 1 additions and 1 deletions

View File

@ -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