mirror of
https://github.com/goharbor/harbor.git
synced 2024-09-10 13:08:03 +02:00
Merge pull request #7170 from wy65701436/gc-untagged
Enable docker registry to clean untagged revisions
This commit is contained in:
commit
08c20c5ca5
@ -38,7 +38,7 @@ type GCResult struct {
|
|||||||
|
|
||||||
// StartGC ...
|
// StartGC ...
|
||||||
func StartGC(w http.ResponseWriter, r *http.Request) {
|
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
|
var outBuf, errBuf bytes.Buffer
|
||||||
cmd.Stdout = &outBuf
|
cmd.Stdout = &outBuf
|
||||||
cmd.Stderr = &errBuf
|
cmd.Stderr = &errBuf
|
||||||
|
Loading…
Reference in New Issue
Block a user