mirror of https://github.com/docker/docs.git
Merge pull request #16992 from burke/fix-mqueue
Fix --ipc=host dependency on /dev/mqueue existing
This commit is contained in:
commit
678acbcb3f
|
@ -218,6 +218,12 @@ func populateCommand(c *Container, env []string) error {
|
||||||
} else {
|
} else {
|
||||||
ipc.HostIpc = c.hostConfig.IpcMode.IsHost()
|
ipc.HostIpc = c.hostConfig.IpcMode.IsHost()
|
||||||
if ipc.HostIpc {
|
if ipc.HostIpc {
|
||||||
|
if _, err := os.Stat("/dev/shm"); err != nil {
|
||||||
|
return fmt.Errorf("/dev/shm is not mounted, but must be for --host=ipc")
|
||||||
|
}
|
||||||
|
if _, err := os.Stat("/dev/mqueue"); err != nil {
|
||||||
|
return fmt.Errorf("/dev/mqueue is not mounted, but must be for --host=ipc")
|
||||||
|
}
|
||||||
c.ShmPath = "/dev/shm"
|
c.ShmPath = "/dev/shm"
|
||||||
c.MqueuePath = "/dev/mqueue"
|
c.MqueuePath = "/dev/mqueue"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue