Windows: Default isolation and workdir

Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 6952135fc8004f669c962c5989fd2e5a05bb2510
Component: engine
This commit is contained in:
John Howard
2016-05-26 13:24:22 -07:00
parent 5a1641d4f8
commit a658ae4b8f
2 changed files with 7 additions and 2 deletions
+2 -2
View File
@@ -207,14 +207,14 @@ func (container *Container) SetupWorkingDirectory(rootUID, rootGID int) error {
return nil
}
container.Config.WorkingDir = filepath.Clean(container.Config.WorkingDir)
// If can't mount container FS at this point (eg Hyper-V Containers on
// Windows) bail out now with no action.
if !container.canMountFS() {
return nil
}
container.Config.WorkingDir = filepath.Clean(container.Config.WorkingDir)
pth, err := container.GetResourcePath(container.Config.WorkingDir)
if err != nil {
return err
@@ -11,6 +11,11 @@ import (
// createContainerPlatformSpecificSettings performs platform specific container create functionality
func (daemon *Daemon) createContainerPlatformSpecificSettings(container *container.Container, config *containertypes.Config, hostConfig *containertypes.HostConfig) error {
// Make sure the host config has the default daemon isolation if not specified by caller.
if containertypes.Isolation.IsDefault(containertypes.Isolation(hostConfig.Isolation)) {
hostConfig.Isolation = daemon.defaultIsolation
}
for spec := range config.Volumes {
mp, err := volume.ParseMountSpec(spec, hostConfig.VolumeDriver)