mirror of
https://github.com/containers/podman.git
synced 2025-06-24 19:42:56 +08:00
Error when trying to copy into a running rootless ctr
We can't pause them, so if that's requested, throw an error. Signed-off-by: Matthew Heon <matthew.heon@pm.me>
This commit is contained in:
@ -98,7 +98,13 @@ func copyBetweenHostAndContainer(runtime *libpod.Runtime, src string, dest strin
|
||||
|
||||
// We can't pause rootless containers.
|
||||
if pause && rootless.IsRootless() {
|
||||
logrus.Warnf("Cannot pause rootless containers - pause option will be ignored")
|
||||
state, err := ctr.State()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if state == libpod.ContainerStateRunning {
|
||||
return errors.Errorf("cannot copy into running rootless container with pause set - pass --pause=false to force copying")
|
||||
}
|
||||
}
|
||||
|
||||
if pause && !rootless.IsRootless() {
|
||||
|
Reference in New Issue
Block a user