mirror of
https://github.com/docker/cli.git
synced 2026-01-15 07:40:57 +03:00
Merge pull request #28047 from cpuguy83/27773_chrootarchive_rbind
Fix issue with cp to container volume dir Upstream-commit: da0ccf8e61e4d5d4005e19fcf0115372f09840bf Component: engine
This commit is contained in:
@@ -30,9 +30,11 @@ func chroot(path string) (err error) {
|
||||
if err := mount.MakeRPrivate("/"); err != nil {
|
||||
return err
|
||||
}
|
||||
// ensure path is a mountpoint
|
||||
if err := mount.MakePrivate(path); err != nil {
|
||||
return err
|
||||
|
||||
if mounted, _ := mount.Mounted(path); !mounted {
|
||||
if err := mount.Mount(path, path, "bind", "rbind,rw"); err != nil {
|
||||
return realChroot(path)
|
||||
}
|
||||
}
|
||||
|
||||
// setup oldRoot for pivot_root
|
||||
|
||||
Reference in New Issue
Block a user