From 4911b588627619b0e5c9cec5180b5aeea1e5fcd9 Mon Sep 17 00:00:00 2001 From: Mrunal Patel Date: Mon, 28 Sep 2015 18:28:16 -0400 Subject: [PATCH] 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 https://github.com/opencontainers/runc/commit/c9d58506297ed6c86c9d8a91d861e4de3772e699 Signed-off-by: Mrunal Patel --- daemon/execdriver/native/create.go | 1 + 1 file changed, 1 insertion(+) diff --git a/daemon/execdriver/native/create.go b/daemon/execdriver/native/create.go index d76dbd2585..063fd28bd7 100644 --- a/daemon/execdriver/native/create.go +++ b/daemon/execdriver/native/create.go @@ -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)