diff options
author | Brent Baude <bbaude@redhat.com> | 2020-03-31 12:59:08 -0500 |
---|---|---|
committer | Brent Baude <bbaude@redhat.com> | 2020-04-01 14:10:57 -0500 |
commit | 8500ce6b9ab0050b925ec3b899495cb2cc8d367f (patch) | |
tree | 554448ea6140ef2a2814fe44b41b5da6f86b06f3 /pkg/domain/infra/tunnel/images.go | |
parent | d534e524272121a6489c1a2a2c11c6b389027ecd (diff) | |
download | podman-8500ce6b9ab0050b925ec3b899495cb2cc8d367f.tar.gz podman-8500ce6b9ab0050b925ec3b899495cb2cc8d367f.tar.bz2 podman-8500ce6b9ab0050b925ec3b899495cb2cc8d367f.zip |
podmanv2 load
enable podman load for v2
add reexec into main
add systemd build flag to v2 makefile
Signed-off-by: Brent Baude <bbaude@redhat.com>
Diffstat (limited to 'pkg/domain/infra/tunnel/images.go')
-rw-r--r-- | pkg/domain/infra/tunnel/images.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/pkg/domain/infra/tunnel/images.go b/pkg/domain/infra/tunnel/images.go index 6a8b9be37..a4a0fccaf 100644 --- a/pkg/domain/infra/tunnel/images.go +++ b/pkg/domain/infra/tunnel/images.go @@ -2,6 +2,7 @@ package tunnel import ( "context" + "os" "github.com/containers/image/v5/docker/reference" images "github.com/containers/libpod/pkg/bindings/images" @@ -157,3 +158,12 @@ func (ir *ImageEngine) Inspect(_ context.Context, names []string, opts entities. } return &report, nil } + +func (ir *ImageEngine) Load(ctx context.Context, opts entities.ImageLoadOptions) (*entities.ImageLoadReport, error) { + f, err := os.Open(opts.Input) + if err != nil { + return nil, err + } + defer f.Close() + return images.Load(ir.ClientCxt, f, &opts.Name) +} |