mirror of https://github.com/docker/docs.git
				
				
				
			Windows: Default isolation and workdir
Signed-off-by: John Howard <jhoward@microsoft.com>
This commit is contained in:
		
							parent
							
								
									ff3dc48966
								
							
						
					
					
						commit
						6952135fc8
					
				|  | @ -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…
	
		Reference in New Issue