summaryrefslogtreecommitdiff
path: root/pkg/domain/infra/tunnel/containers.go
diff options
context:
space:
mode:
authorMehul Arora <aroram18@mcmaster.ca>2021-06-19 11:27:24 +0530
committerValentin Rothberg <rothberg@redhat.com>2021-07-27 15:32:23 +0200
commit6fe03b25abded53b67a7707abbcd9708042d9151 (patch)
tree91d3f08eee6a7389873d8f22db9dee1393c05a18 /pkg/domain/infra/tunnel/containers.go
parentb6c279be2296ce32fbb36ba39bd948f93be9bede (diff)
downloadpodman-6fe03b25abded53b67a7707abbcd9708042d9151.tar.gz
podman-6fe03b25abded53b67a7707abbcd9708042d9151.tar.bz2
podman-6fe03b25abded53b67a7707abbcd9708042d9151.zip
support container to container copy
Implement container to container copy. Previously data could only be copied from/to the host. Fixes: #7370 Co-authored-by: Mehul Arora <aroram18@mcmaster.ca> Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'pkg/domain/infra/tunnel/containers.go')
-rw-r--r--pkg/domain/infra/tunnel/containers.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/pkg/domain/infra/tunnel/containers.go b/pkg/domain/infra/tunnel/containers.go
index d7e8a4e46..58f9c5fb0 100644
--- a/pkg/domain/infra/tunnel/containers.go
+++ b/pkg/domain/infra/tunnel/containers.go
@@ -853,7 +853,8 @@ func (ic *ContainerEngine) ContainerPort(ctx context.Context, nameOrID string, o
}
func (ic *ContainerEngine) ContainerCopyFromArchive(ctx context.Context, nameOrID, path string, reader io.Reader, options entities.CopyOptions) (entities.ContainerCopyFunc, error) {
- return containers.CopyFromArchiveWithOptions(ic.ClientCtx, nameOrID, path, reader, new(containers.CopyOptions).WithChown(options.Chown))
+ copyOptions := new(containers.CopyOptions).WithChown(options.Chown).WithRename(options.Rename)
+ return containers.CopyFromArchiveWithOptions(ic.ClientCtx, nameOrID, path, reader, copyOptions)
}
func (ic *ContainerEngine) ContainerCopyToArchive(ctx context.Context, nameOrID string, path string, writer io.Writer) (entities.ContainerCopyFunc, error) {