mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #23030 from Microsoft/jjh/xenonworkdir
Windows: Default isolation and workdir
This commit is contained in:
commit
1d87f788b1
2 changed files with 7 additions and 2 deletions
|
@ -207,14 +207,14 @@ func (container *Container) SetupWorkingDirectory(rootUID, rootGID int) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
container.Config.WorkingDir = filepath.Clean(container.Config.WorkingDir)
|
||||||
|
|
||||||
// If can't mount container FS at this point (eg Hyper-V Containers on
|
// If can't mount container FS at this point (eg Hyper-V Containers on
|
||||||
// Windows) bail out now with no action.
|
// Windows) bail out now with no action.
|
||||||
if !container.canMountFS() {
|
if !container.canMountFS() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
container.Config.WorkingDir = filepath.Clean(container.Config.WorkingDir)
|
|
||||||
|
|
||||||
pth, err := container.GetResourcePath(container.Config.WorkingDir)
|
pth, err := container.GetResourcePath(container.Config.WorkingDir)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
|
@ -11,6 +11,11 @@ import (
|
||||||
|
|
||||||
// createContainerPlatformSpecificSettings performs platform specific container create functionality
|
// createContainerPlatformSpecificSettings performs platform specific container create functionality
|
||||||
func (daemon *Daemon) createContainerPlatformSpecificSettings(container *container.Container, config *containertypes.Config, hostConfig *containertypes.HostConfig) error {
|
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 {
|
for spec := range config.Volumes {
|
||||||
|
|
||||||
mp, err := volume.ParseMountSpec(spec, hostConfig.VolumeDriver)
|
mp, err := volume.ParseMountSpec(spec, hostConfig.VolumeDriver)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue