mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Revert "Fix --ipc=host dependency on /dev/mqueue existing"
This reverts commit f624d6187a
.
Signed-off-by: Burke Libbey <burke.libbey@shopify.com>
This commit is contained in:
parent
f624d6187a
commit
ab7923558d
2 changed files with 8 additions and 2 deletions
|
@ -288,7 +288,7 @@ func (container *Container) Start() (err error) {
|
|||
return err
|
||||
}
|
||||
|
||||
if !container.hostConfig.IpcMode.IsContainer() {
|
||||
if !container.hostConfig.IpcMode.IsContainer() && !container.hostConfig.IpcMode.IsHost() {
|
||||
if err := container.setupIpcDirs(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
@ -214,6 +214,12 @@ func populateCommand(c *Container, env []string) error {
|
|||
ipc.ContainerID = ic.ID
|
||||
c.ShmPath = ic.ShmPath
|
||||
c.MqueuePath = ic.MqueuePath
|
||||
} else {
|
||||
ipc.HostIpc = c.hostConfig.IpcMode.IsHost()
|
||||
if ipc.HostIpc {
|
||||
c.ShmPath = "/dev/shm"
|
||||
c.MqueuePath = "/dev/mqueue"
|
||||
}
|
||||
}
|
||||
|
||||
pid := &execdriver.Pid{}
|
||||
|
@ -1402,7 +1408,7 @@ func (container *Container) setupIpcDirs() error {
|
|||
}
|
||||
|
||||
func (container *Container) unmountIpcMounts() error {
|
||||
if container.hostConfig.IpcMode.IsContainer() {
|
||||
if container.hostConfig.IpcMode.IsContainer() || container.hostConfig.IpcMode.IsHost() {
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue