Browse code

LCOW: Don't mount for linux containers either

Signed-off-by: John Howard <jhoward@microsoft.com>

John Howard authored on 2017/06/17 12:28:18
Showing 1 changed files
... ...
@@ -486,6 +486,11 @@ func (daemon *Daemon) runAsHyperVContainer(hostConfig *containertypes.HostConfig
486 486
 // conditionalMountOnStart is a platform specific helper function during the
487 487
 // container start to call mount.
488 488
 func (daemon *Daemon) conditionalMountOnStart(container *container.Container) error {
489
+	// Bail out now for Linux containers
490
+	if system.LCOWSupported() && container.Platform != "windows" {
491
+		return nil
492
+	}
493
+
489 494
 	// We do not mount if a Hyper-V container
490 495
 	if !daemon.runAsHyperVContainer(container.HostConfig) {
491 496
 		return daemon.Mount(container)
... ...
@@ -496,6 +501,11 @@ func (daemon *Daemon) conditionalMountOnStart(container *container.Container) er
496 496
 // conditionalUnmountOnCleanup is a platform specific helper function called
497 497
 // during the cleanup of a container to unmount.
498 498
 func (daemon *Daemon) conditionalUnmountOnCleanup(container *container.Container) error {
499
+	// Bail out now for Linux containers
500
+	if system.LCOWSupported() && container.Platform != "windows" {
501
+		return nil
502
+	}
503
+
499 504
 	// We do not unmount if a Hyper-V container
500 505
 	if !daemon.runAsHyperVContainer(container.HostConfig) {
501 506
 		return daemon.Unmount(container)