summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorMatej Vasek <mvasek@redhat.com>2021-05-07 20:35:03 +0200
committerMatej Vasek <mvasek@redhat.com>2021-05-07 20:35:03 +0200
commitc8deab8296ea1267d78a8ada45c3cfdc45fa207a (patch)
treef759785789b72991146a80592856fc04603b4893 /pkg
parent0ce6a65b3961465593470c3457d75b0a846c8d98 (diff)
downloadpodman-c8deab8296ea1267d78a8ada45c3cfdc45fa207a.tar.gz
podman-c8deab8296ea1267d78a8ada45c3cfdc45fa207a.tar.bz2
podman-c8deab8296ea1267d78a8ada45c3cfdc45fa207a.zip
fix: compat API "images/get" for multiple images
Signed-off-by: Matej Vasek <mvasek@redhat.com>
Diffstat (limited to 'pkg')
-rw-r--r--pkg/api/handlers/compat/images.go6
1 files changed, 1 insertions, 5 deletions
diff --git a/pkg/api/handlers/compat/images.go b/pkg/api/handlers/compat/images.go
index 4b7a2a71c..dc0cb1237 100644
--- a/pkg/api/handlers/compat/images.go
+++ b/pkg/api/handlers/compat/images.go
@@ -455,10 +455,6 @@ func ExportImages(w http.ResponseWriter, r *http.Request) {
utils.Error(w, "Something went wrong.", http.StatusBadRequest, fmt.Errorf("no images to download"))
return
}
- if len(query.Names) > 1 {
- utils.Error(w, "Something went wrong.", http.StatusNotImplemented, fmt.Errorf("getting multiple image is not supported yet"))
- return
- }
images := query.Names
tmpfile, err := ioutil.TempFile("", "api.tar")
@@ -474,7 +470,7 @@ func ExportImages(w http.ResponseWriter, r *http.Request) {
imageEngine := abi.ImageEngine{Libpod: runtime}
- saveOptions := entities.ImageSaveOptions{Format: "docker-archive", Output: tmpfile.Name()}
+ saveOptions := entities.ImageSaveOptions{Format: "docker-archive", Output: tmpfile.Name(), MultiImageArchive: true}
if err := imageEngine.Save(r.Context(), images[0], images[1:], saveOptions); err != nil {
utils.InternalServerError(w, err)
return