summaryrefslogtreecommitdiff
path: root/pkg/api/handlers/compat/images_prune.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/api/handlers/compat/images_prune.go')
-rw-r--r--pkg/api/handlers/compat/images_prune.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/pkg/api/handlers/compat/images_prune.go b/pkg/api/handlers/compat/images_prune.go
index ddf559ec6..bbbfb5577 100644
--- a/pkg/api/handlers/compat/images_prune.go
+++ b/pkg/api/handlers/compat/images_prune.go
@@ -8,6 +8,8 @@ import (
"github.com/containers/podman/v3/libpod"
"github.com/containers/podman/v3/pkg/api/handlers"
"github.com/containers/podman/v3/pkg/api/handlers/utils"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/domain/infra/abi"
"github.com/containers/podman/v3/pkg/util"
"github.com/docker/docker/api/types"
"github.com/pkg/errors"
@@ -30,7 +32,11 @@ func PruneImages(w http.ResponseWriter, r *http.Request) {
filters = append(filters, fmt.Sprintf("%s=%s", k, val))
}
}
- imagePruneReports, err := runtime.ImageRuntime().PruneImages(r.Context(), false, filters)
+
+ imageEngine := abi.ImageEngine{Libpod: runtime}
+
+ pruneOptions := entities.ImagePruneOptions{Filter: filters}
+ imagePruneReports, err := imageEngine.Prune(r.Context(), pruneOptions)
if err != nil {
utils.InternalServerError(w, err)
return