mirror of
https://github.com/docker/compose.git
synced 2025-07-21 12:44:54 +02:00
add log when copying files/directories between host and containers (both way)
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
This commit is contained in:
parent
2336d9fe35
commit
fdc1738143
@ -82,15 +82,15 @@ func (s *composeService) Copy(ctx context.Context, projectName string, options a
|
|||||||
for _, cont := range containers {
|
for _, cont := range containers {
|
||||||
container := cont
|
container := cont
|
||||||
g.Go(func() error {
|
g.Go(func() error {
|
||||||
err := copyFunc(ctx, container.ID, srcPath, dstPath, options)
|
if err := copyFunc(ctx, container.ID, srcPath, dstPath, options); err != nil {
|
||||||
if s.dryRun && err == nil {
|
return err
|
||||||
fromOrInside := "inside"
|
|
||||||
if direction == fromService {
|
|
||||||
fromOrInside = "from"
|
|
||||||
}
|
|
||||||
fmt.Printf("Copy %s to path %s %s %s service container\n", srcPath, dstPath, fromOrInside, getCanonicalContainerName(container))
|
|
||||||
}
|
}
|
||||||
return err
|
fromOrInside := "inside"
|
||||||
|
if direction == fromService {
|
||||||
|
fromOrInside = "from"
|
||||||
|
}
|
||||||
|
fmt.Fprintf(s.stderr(), "Copy %s to path %s %s %s service container\n", srcPath, dstPath, fromOrInside, getCanonicalContainerName(container))
|
||||||
|
return nil
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user