mirror of
				https://github.com/moby/moby.git
				synced 2022-11-09 12:21:53 -05:00 
			
		
		
		
	Merge pull request #5717 from philips/mkdir-in-daemon
fix(daemon): ensure the /var/lib/docker dir exists
This commit is contained in:
		
						commit
						bc77ec2b17
					
				
					 1 changed files with 6 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -680,6 +680,12 @@ func NewDaemonFromDirectory(config *daemonconfig.Config, eng *engine.Engine) (*D
 | 
			
		|||
	if !config.EnableSelinuxSupport {
 | 
			
		||||
		selinux.SetDisabled()
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	// Create the root directory if it doesn't exists
 | 
			
		||||
	if err := os.MkdirAll(config.Root, 0700); err != nil && !os.IsExist(err) {
 | 
			
		||||
		return nil, err
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	// Set the default driver
 | 
			
		||||
	graphdriver.DefaultDriver = config.GraphDriver
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue