Sfoglia il codice sorgente

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 <mrunalp@gmail.com>
Mrunal Patel 9 anni fa
parent
commit
4911b58862
1 ha cambiato i file con 1 aggiunte e 0 eliminazioni
  1. 1 0
      daemon/execdriver/native/create.go

+ 1 - 0
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)