summaryrefslogtreecommitdiff
path: root/libpod/adapter/runtime.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-02-20 23:52:35 +0100
committerGitHub <noreply@github.com>2019-02-20 23:52:35 +0100
commit2cf2b7f8a688973010a4ce504ab4917cb4a85a15 (patch)
treee8c7c83be19cc075446b20ea49a88c529dda69f1 /libpod/adapter/runtime.go
parent4de0bf9c74624de8a2cab1e5cbebc0beaa67339a (diff)
parent711ac9305185e645f2970d09ff76c2761132202a (diff)
downloadpodman-2cf2b7f8a688973010a4ce504ab4917cb4a85a15.tar.gz
podman-2cf2b7f8a688973010a4ce504ab4917cb4a85a15.tar.bz2
podman-2cf2b7f8a688973010a4ce504ab4917cb4a85a15.zip
Merge pull request #2367 from baude/remotesave
podman-remote save [image]
Diffstat (limited to 'libpod/adapter/runtime.go')
-rw-r--r--libpod/adapter/runtime.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/libpod/adapter/runtime.go b/libpod/adapter/runtime.go
index 02ef9af07..b12f63cdc 100644
--- a/libpod/adapter/runtime.go
+++ b/libpod/adapter/runtime.go
@@ -310,3 +310,15 @@ func (r *LocalRuntime) Build(ctx context.Context, c *cliconfig.BuildValues, opti
func (r *LocalRuntime) PruneVolumes(ctx context.Context) ([]string, []error) {
return r.Runtime.PruneVolumes(ctx)
}
+
+// SaveImage is a wrapper function for saving an image to the local filesystem
+func (r *LocalRuntime) SaveImage(ctx context.Context, c *cliconfig.SaveValues) error {
+ source := c.InputArgs[0]
+ additionalTags := c.InputArgs[1:]
+
+ newImage, err := r.Runtime.ImageRuntime().NewFromLocal(source)
+ if err != nil {
+ return err
+ }
+ return newImage.Save(ctx, source, c.Format, c.Output, additionalTags, c.Quiet, c.Compress)
+}