mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Better error when --host=ipc but no /dev/mqueue
Signed-off-by: Burke Libbey <burke.libbey@shopify.com>
This commit is contained in:
parent
ab7923558d
commit
fd955ce6ca
1 changed files with 6 additions and 0 deletions
|
@ -217,6 +217,12 @@ func populateCommand(c *Container, env []string) error {
|
|||
} else {
|
||||
ipc.HostIpc = c.hostConfig.IpcMode.IsHost()
|
||||
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.MqueuePath = "/dev/mqueue"
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue