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>
This commit is contained in:
Mrunal Patel 2015-09-28 18:28:16 -04:00
parent d6e7350b96
commit 4911b58862

View file

@ -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)