summaryrefslogtreecommitdiff
path: root/libpod/image/image.go
diff options
context:
space:
mode:
Diffstat (limited to 'libpod/image/image.go')
-rw-r--r--libpod/image/image.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/libpod/image/image.go b/libpod/image/image.go
index b6e15e361..ac2431a56 100644
--- a/libpod/image/image.go
+++ b/libpod/image/image.go
@@ -641,7 +641,7 @@ func (i *Image) Inspect() (*inspect.ImageData, error) {
}
// Import imports and image into the store and returns an image
-func Import(path, reference string, writer io.Writer, signingOptions SigningOptions, imageConfig ociv1.Image, runtime *Runtime) (*Image, error) {
+func (ir *Runtime) Import(path, reference string, writer io.Writer, signingOptions SigningOptions, imageConfig ociv1.Image) (*Image, error) {
file := TarballTransport + ":" + path
src, err := alltransports.ParseImageName(file)
if err != nil {
@@ -676,14 +676,14 @@ func Import(path, reference string, writer io.Writer, signingOptions SigningOpti
}
defer policyContext.Destroy()
copyOptions := getCopyOptions(writer, "", nil, nil, signingOptions, "", "", false)
- dest, err := is.Transport.ParseStoreReference(runtime.store, reference)
+ dest, err := is.Transport.ParseStoreReference(ir.store, reference)
if err != nil {
errors.Wrapf(err, "error getting image reference for %q", reference)
}
if err = cp.Image(policyContext, dest, src, copyOptions); err != nil {
return nil, err
}
- return runtime.NewFromLocal(reference)
+ return ir.NewFromLocal(reference)
}
// MatchRepoTag takes a string and tries to match it against an