aboutsummaryrefslogtreecommitdiff
path: root/pkg/api
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/api')
-rw-r--r--pkg/api/handlers/libpod/images.go3
-rw-r--r--pkg/api/server/register_images.go4
2 files changed, 6 insertions, 1 deletions
diff --git a/pkg/api/handlers/libpod/images.go b/pkg/api/handlers/libpod/images.go
index eb9fb12a6..d59a83342 100644
--- a/pkg/api/handlers/libpod/images.go
+++ b/pkg/api/handlers/libpod/images.go
@@ -613,6 +613,7 @@ func ImagesBatchRemove(w http.ResponseWriter, r *http.Request) {
query := struct {
All bool `schema:"all"`
Force bool `schema:"force"`
+ Ignore bool `schema:"ignore"`
Images []string `schema:"images"`
}{}
@@ -621,7 +622,7 @@ func ImagesBatchRemove(w http.ResponseWriter, r *http.Request) {
return
}
- opts := entities.ImageRemoveOptions{All: query.All, Force: query.Force}
+ opts := entities.ImageRemoveOptions{All: query.All, Force: query.Force, Ignore: query.Ignore}
imageEngine := abi.ImageEngine{Libpod: runtime}
rmReport, rmErrors := imageEngine.Remove(r.Context(), query.Images, opts)
strErrs := errorhandling.ErrorsToStrings(rmErrors)
diff --git a/pkg/api/server/register_images.go b/pkg/api/server/register_images.go
index 017310f12..89f808e7d 100644
--- a/pkg/api/server/register_images.go
+++ b/pkg/api/server/register_images.go
@@ -944,6 +944,10 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
// name: force
// description: Force image removal (including containers using the images).
// type: boolean
+ // - in: query
+ // name: ignore
+ // description: Ignore if a specified image does not exist and do not throw an error.
+ // type: boolean
// produces:
// - application/json
// responses: