mirror of
https://github.com/containers/podman.git
synced 2025-10-16 02:32:55 +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
@ -23,7 +23,7 @@ import (
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
func (c *Container) copyFromArchive(ctx context.Context, path string, chown bool, reader io.Reader) (func() error, error) {
|
||||
func (c *Container) copyFromArchive(ctx context.Context, path string, chown bool, rename map[string]string, reader io.Reader) (func() error, error) {
|
||||
var (
|
||||
mountPoint string
|
||||
resolvedRoot string
|
||||
@ -89,6 +89,7 @@ func (c *Container) copyFromArchive(ctx context.Context, path string, chown bool
|
||||
GIDMap: c.config.IDMappings.GIDMap,
|
||||
ChownDirs: idPair,
|
||||
ChownFiles: idPair,
|
||||
Rename: rename,
|
||||
}
|
||||
|
||||
return c.joinMountAndExec(ctx,
|
||||
|
Reference in New Issue
Block a user