Browse code

Use /var/run/docker as root for execdriver

Signed-off-by: Alexander Morozov <lk4d4@docker.com>

Alexander Morozov authored on 2015/03/25 02:47:30
Showing 3 changed files
... ...
@@ -1012,7 +1012,8 @@ func NewDaemonFromDirectory(config *Config, eng *engine.Engine) (*Daemon, error)
1012 1012
 	}
1013 1013
 
1014 1014
 	sysInfo := sysinfo.New(false)
1015
-	ed, err := execdrivers.NewDriver(config.ExecDriver, config.Root, sysInitPath, sysInfo)
1015
+	const runDir = "/var/run/docker"
1016
+	ed, err := execdrivers.NewDriver(config.ExecDriver, runDir, sysInitPath, sysInfo)
1016 1017
 	if err != nil {
1017 1018
 		return nil, err
1018 1019
 	}
... ...
@@ -64,7 +64,6 @@ func NewDriver(root, initPath string) (*driver, error) {
64 64
 		root,
65 65
 		cgm,
66 66
 		libcontainer.InitPath(reexec.Self(), DriverName),
67
-		libcontainer.TmpfsRoot,
68 67
 	)
69 68
 	if err != nil {
70 69
 		return nil, err
... ...
@@ -17,11 +17,13 @@ var (
17 17
 	privateRegistryURL = "127.0.0.1:5000"
18 18
 
19 19
 	dockerBasePath       = "/var/lib/docker"
20
-	execDriverPath       = dockerBasePath + "/execdriver/native"
21 20
 	volumesConfigPath    = dockerBasePath + "/volumes"
22 21
 	volumesStoragePath   = dockerBasePath + "/vfs/dir"
23 22
 	containerStoragePath = dockerBasePath + "/containers"
24 23
 
24
+	runtimePath    = "/var/run/docker"
25
+	execDriverPath = runtimePath + "/execdriver/native"
26
+
25 27
 	workingDirectory string
26 28
 )
27 29