diff --git a/daemon/container.go b/daemon/container.go index 53807f90e6..b31c40bd88 100644 --- a/daemon/container.go +++ b/daemon/container.go @@ -288,7 +288,7 @@ func (container *Container) Start() (err error) { return err } - if !container.hostConfig.IpcMode.IsContainer() && !container.hostConfig.IpcMode.IsHost() { + if !container.hostConfig.IpcMode.IsContainer() { if err := container.setupIpcDirs(); err != nil { return err } diff --git a/daemon/container_unix.go b/daemon/container_unix.go index a31fde6f78..b6ed72b923 100644 --- a/daemon/container_unix.go +++ b/daemon/container_unix.go @@ -214,12 +214,6 @@ 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{} @@ -1408,7 +1402,7 @@ func (container *Container) setupIpcDirs() error { } func (container *Container) unmountIpcMounts() error { - if container.hostConfig.IpcMode.IsContainer() || container.hostConfig.IpcMode.IsHost() { + if container.hostConfig.IpcMode.IsContainer() { return nil }