Skip /dev setup in container when it is bind mounted in
We need to set the device array to nil to skip /dev setup in runc/libcontainer.
See c9d5850629
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
Upstream-commit: 4911b588627619b0e5c9cec5180b5aeea1e5fcd9
Component: engine
This commit is contained in:
@ -260,6 +260,7 @@ func (d *Driver) setupMounts(container *configs.Config, c *execdriver.Command) e
|
||||
for _, m := range container.Mounts {
|
||||
if _, ok := userMounts[m.Destination]; !ok {
|
||||
if mountDev && strings.HasPrefix(m.Destination, "/dev/") {
|
||||
container.Devices = nil
|
||||
continue
|
||||
}
|
||||
defaultMounts = append(defaultMounts, m)
|
||||
|
||||
Reference in New Issue
Block a user