From 837aad724ff1f7f4cc3b125b8b3419af29cd4982 Mon Sep 17 00:00:00 2001 From: Brent Baude Date: Mon, 30 Mar 2020 12:59:05 -0500 Subject: podmanv2 save image add ability to save an image for podman v2 Signed-off-by: Brent Baude --- pkg/domain/infra/abi/images.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'pkg/domain/infra/abi') 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) +} -- cgit v1.2.3-54-g00ecf