mirror of https://github.com/docker/docs.git
Merge pull request #10283 from rhatdan/dev
We want to allow the sharing of /dev from the host into the container.
This commit is contained in:
commit
131b29f7bc
|
@ -220,8 +220,12 @@ func (d *driver) setupMounts(container *configs.Config, c *execdriver.Command) e
|
||||||
|
|
||||||
// Filter out mounts that are overriden by user supplied mounts
|
// Filter out mounts that are overriden by user supplied mounts
|
||||||
var defaultMounts []*configs.Mount
|
var defaultMounts []*configs.Mount
|
||||||
|
_, mountDev := userMounts["/dev"]
|
||||||
for _, m := range container.Mounts {
|
for _, m := range container.Mounts {
|
||||||
if _, ok := userMounts[m.Destination]; !ok {
|
if _, ok := userMounts[m.Destination]; !ok {
|
||||||
|
if mountDev && strings.HasPrefix(m.Destination, "/dev/") {
|
||||||
|
continue
|
||||||
|
}
|
||||||
defaultMounts = append(defaultMounts, m)
|
defaultMounts = append(defaultMounts, m)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue