mirror of
https://github.com/goharbor/harbor.git
synced 2025-02-01 20:41:22 +01:00
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:
parent
9a1b5eac26
commit
44c290c0ed
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user