mirror of
				https://github.com/moby/moby.git
				synced 2022-11-09 12:21:53 -05:00 
			
		
		
		
	Optimize Create Container to skip extra mount on Windows.
Signed-off-by: Stefan J. Wernli <swernli@microsoft.com>
This commit is contained in:
		
							parent
							
								
									fa0ee3fb89
								
							
						
					
					
						commit
						9112d90b27
					
				
					 2 changed files with 5 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -114,10 +114,6 @@ func (daemon *Daemon) create(params *ContainerCreateConfig) (retC *Container, re
 | 
			
		|||
			}
 | 
			
		||||
		}
 | 
			
		||||
	}()
 | 
			
		||||
	if err := daemon.Mount(container); err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
	}
 | 
			
		||||
	defer daemon.Unmount(container)
 | 
			
		||||
 | 
			
		||||
	if err := daemon.createContainerPlatformSpecificSettings(container, params.Config, params.HostConfig, img); err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -16,6 +16,11 @@ import (
 | 
			
		|||
 | 
			
		||||
// createContainerPlatformSpecificSettings performs platform specific container create functionality
 | 
			
		||||
func (daemon *Daemon) createContainerPlatformSpecificSettings(container *Container, config *runconfig.Config, hostConfig *runconfig.HostConfig, img *image.Image) error {
 | 
			
		||||
	if err := daemon.Mount(container); err != nil {
 | 
			
		||||
		return err
 | 
			
		||||
	}
 | 
			
		||||
	defer daemon.Unmount(container)
 | 
			
		||||
 | 
			
		||||
	for spec := range config.Volumes {
 | 
			
		||||
		name := stringid.GenerateNonCryptoID()
 | 
			
		||||
		destination := filepath.Clean(spec)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue