diff options
author | cdoern <cdoern@redhat.com> | 2021-08-11 16:14:57 -0400 |
---|---|---|
committer | cdoern <cbdoer23@g.holycross.edu> | 2021-11-05 12:04:20 -0400 |
commit | ffa5ed0e0e00f79a1f3b6a88bf9efce3dbb19207 (patch) | |
tree | e8f64c52d0785e84d46ae6879f9ecb7c590b55fd /pkg/domain/infra/tunnel | |
parent | 85bad0cc7c68b71ab7ddb6ed09b862145c6c6d0e (diff) | |
download | podman-ffa5ed0e0e00f79a1f3b6a88bf9efce3dbb19207.tar.gz podman-ffa5ed0e0e00f79a1f3b6a88bf9efce3dbb19207.tar.bz2 podman-ffa5ed0e0e00f79a1f3b6a88bf9efce3dbb19207.zip |
Podman Image SCP rootful to rootless transfer
Added functionality for users to transfer images from root storage to rootless storage without using sshd. This is
done through rootful podman by running `sudo podman image scp root@localhost::image user@localhost:: the user is needed
in order to find and use their uid/gid to exec a new process.
added necessary tests, and functions for this implementation. Created new image function Transfer so that
the underlying code is majorly removed from CLI
Signed-off-by: cdoern <cdoern@redhat.com>
Diffstat (limited to 'pkg/domain/infra/tunnel')
-rw-r--r-- | pkg/domain/infra/tunnel/images.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/pkg/domain/infra/tunnel/images.go b/pkg/domain/infra/tunnel/images.go index b8af2de68..ed0c35de4 100644 --- a/pkg/domain/infra/tunnel/images.go +++ b/pkg/domain/infra/tunnel/images.go @@ -12,6 +12,7 @@ import ( "github.com/containers/common/pkg/config" "github.com/containers/image/v5/docker/reference" "github.com/containers/image/v5/types" + "github.com/containers/podman/v3/libpod/define" "github.com/containers/podman/v3/pkg/bindings/images" "github.com/containers/podman/v3/pkg/domain/entities" "github.com/containers/podman/v3/pkg/domain/entities/reports" @@ -122,6 +123,10 @@ func (ir *ImageEngine) Pull(ctx context.Context, rawImage string, opts entities. return &entities.ImagePullReport{Images: pulledImages}, nil } +func (ir *ImageEngine) Transfer(ctx context.Context, scpOpts entities.ImageScpOptions) error { + return errors.Wrapf(define.ErrNotImplemented, "cannot use the remote client to transfer images between root and rootless storage") +} + func (ir *ImageEngine) Tag(ctx context.Context, nameOrID string, tags []string, opt entities.ImageTagOptions) error { options := new(images.TagOptions) for _, newTag := range tags { |