summaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
Diffstat (limited to 'libpod')
-rw-r--r--libpod/image/prune.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/libpod/image/prune.go b/libpod/image/prune.go
index d6ae5feaf..21867698a 100644
--- a/libpod/image/prune.go
+++ b/libpod/image/prune.go
@@ -2,6 +2,7 @@ package image
import (
"context"
+ "strconv"
"strings"
"time"
@@ -52,6 +53,12 @@ func generatePruneFilterFuncs(filter, filterValue string) (ImageFilter, error) {
}
return false
}, nil
+ case "dangling":
+ danglingImages, err := strconv.ParseBool(filterValue)
+ if err != nil {
+ return nil, errors.Wrapf(err, "invalid filter dangling=%s", filterValue)
+ }
+ return ImageFilter(DanglingFilter(danglingImages)), nil
}
return nil, nil
}