summaryrefslogtreecommitdiff
path: root/libpod/image/prune.go
diff options
context:
space:
mode:
Diffstat (limited to 'libpod/image/prune.go')
-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 7ee3e077e..12727901a 100644
--- a/libpod/image/prune.go
+++ b/libpod/image/prune.go
@@ -2,6 +2,7 @@ package image
import (
"context"
+ "strconv"
"strings"
"github.com/containers/podman/v3/libpod/events"
@@ -34,6 +35,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
}