mirror of
https://github.com/containers/podman.git
synced 2025-09-18 15:54:49 +08:00
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>
This commit is contained in:

committed by
Valentin Rothberg

parent
b6c279be22
commit
6fe03b25ab
@ -840,7 +840,7 @@ func (c *Container) ShouldRestart(ctx context.Context) bool {
|
||||
|
||||
// CopyFromArchive copies the contents from the specified tarStream to path
|
||||
// *inside* the container.
|
||||
func (c *Container) CopyFromArchive(ctx context.Context, containerPath string, chown bool, tarStream io.Reader) (func() error, error) {
|
||||
func (c *Container) CopyFromArchive(ctx context.Context, containerPath string, chown bool, rename map[string]string, tarStream io.Reader) (func() error, error) {
|
||||
if !c.batched {
|
||||
c.lock.Lock()
|
||||
defer c.lock.Unlock()
|
||||
@ -850,7 +850,7 @@ func (c *Container) CopyFromArchive(ctx context.Context, containerPath string, c
|
||||
}
|
||||
}
|
||||
|
||||
return c.copyFromArchive(ctx, containerPath, chown, tarStream)
|
||||
return c.copyFromArchive(ctx, containerPath, chown, rename, tarStream)
|
||||
}
|
||||
|
||||
// CopyToArchive copies the contents from the specified path *inside* the
|
||||
|
Reference in New Issue
Block a user