mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
LCOW: Don't mount for linux containers either
Signed-off-by: John Howard <jhoward@microsoft.com>
This commit is contained in:
parent
ed10ac6ee9
commit
f8aa70055e
1 changed files with 10 additions and 0 deletions
|
@ -486,6 +486,11 @@ func (daemon *Daemon) runAsHyperVContainer(hostConfig *containertypes.HostConfig
|
|||
// conditionalMountOnStart is a platform specific helper function during the
|
||||
// container start to call mount.
|
||||
func (daemon *Daemon) conditionalMountOnStart(container *container.Container) error {
|
||||
// Bail out now for Linux containers
|
||||
if system.LCOWSupported() && container.Platform != "windows" {
|
||||
return nil
|
||||
}
|
||||
|
||||
// We do not mount if a Hyper-V container
|
||||
if !daemon.runAsHyperVContainer(container.HostConfig) {
|
||||
return daemon.Mount(container)
|
||||
|
@ -496,6 +501,11 @@ func (daemon *Daemon) conditionalMountOnStart(container *container.Container) er
|
|||
// conditionalUnmountOnCleanup is a platform specific helper function called
|
||||
// during the cleanup of a container to unmount.
|
||||
func (daemon *Daemon) conditionalUnmountOnCleanup(container *container.Container) error {
|
||||
// Bail out now for Linux containers
|
||||
if system.LCOWSupported() && container.Platform != "windows" {
|
||||
return nil
|
||||
}
|
||||
|
||||
// We do not unmount if a Hyper-V container
|
||||
if !daemon.runAsHyperVContainer(container.HostConfig) {
|
||||
return daemon.Unmount(container)
|
||||
|
|
Loading…
Add table
Reference in a new issue