summaryrefslogtreecommitdiff
path: root/pkg/domain/infra/abi
diff options
context:
space:
mode:
authorBrent Baude <bbaude@redhat.com>2020-03-30 12:59:05 -0500
committerBrent Baude <bbaude@redhat.com>2020-04-03 13:07:35 -0500
commit837aad724ff1f7f4cc3b125b8b3419af29cd4982 (patch)
tree25ad8d10028a7d742e9fd61d1c96d87fbc342090 /pkg/domain/infra/abi
parenta89d62ac3a445a5d76bd72d4b8e1bb9262ba74c6 (diff)
downloadpodman-837aad724ff1f7f4cc3b125b8b3419af29cd4982.tar.gz
podman-837aad724ff1f7f4cc3b125b8b3419af29cd4982.tar.bz2
podman-837aad724ff1f7f4cc3b125b8b3419af29cd4982.zip
podmanv2 save image
add ability to save an image for podman v2 Signed-off-by: Brent Baude <bbaude@redhat.com>
Diffstat (limited to 'pkg/domain/infra/abi')
-rw-r--r--pkg/domain/infra/abi/images.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/pkg/domain/infra/abi/images.go b/pkg/domain/infra/abi/images.go
index 94008f287..9d706a112 100644
--- a/pkg/domain/infra/abi/images.go
+++ b/pkg/domain/infra/abi/images.go
@@ -405,3 +405,11 @@ func (ir *ImageEngine) Import(ctx context.Context, opts entities.ImageImportOpti
}
return &entities.ImageImportReport{Id: id}, nil
}
+
+func (ir *ImageEngine) Save(ctx context.Context, nameOrId string, tags []string, options entities.ImageSaveOptions) error {
+ newImage, err := ir.Libpod.ImageRuntime().NewFromLocal(nameOrId)
+ if err != nil {
+ return err
+ }
+ return newImage.Save(ctx, nameOrId, options.Format, options.Output, tags, options.Quiet, options.Compress)
+}