浏览代码

Use /var/run/docker as root for execdriver

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Alexander Morozov 10 年之前
父节点
当前提交
1e788ec985
共有 3 个文件被更改,包括 5 次插入3 次删除
  1. 2 1
      daemon/daemon.go
  2. 0 1
      daemon/execdriver/native/driver.go
  3. 3 1
      integration-cli/docker_test_vars.go

+ 2 - 1
daemon/daemon.go

@@ -1012,7 +1012,8 @@ func NewDaemonFromDirectory(config *Config, eng *engine.Engine) (*Daemon, error)
 	}
 	}
 
 
 	sysInfo := sysinfo.New(false)
 	sysInfo := sysinfo.New(false)
-	ed, err := execdrivers.NewDriver(config.ExecDriver, config.Root, sysInitPath, sysInfo)
+	const runDir = "/var/run/docker"
+	ed, err := execdrivers.NewDriver(config.ExecDriver, runDir, sysInitPath, sysInfo)
 	if err != nil {
 	if err != nil {
 		return nil, err
 		return nil, err
 	}
 	}

+ 0 - 1
daemon/execdriver/native/driver.go

@@ -64,7 +64,6 @@ func NewDriver(root, initPath string) (*driver, error) {
 		root,
 		root,
 		cgm,
 		cgm,
 		libcontainer.InitPath(reexec.Self(), DriverName),
 		libcontainer.InitPath(reexec.Self(), DriverName),
-		libcontainer.TmpfsRoot,
 	)
 	)
 	if err != nil {
 	if err != nil {
 		return nil, err
 		return nil, err

+ 3 - 1
integration-cli/docker_test_vars.go

@@ -17,11 +17,13 @@ var (
 	privateRegistryURL = "127.0.0.1:5000"
 	privateRegistryURL = "127.0.0.1:5000"
 
 
 	dockerBasePath       = "/var/lib/docker"
 	dockerBasePath       = "/var/lib/docker"
-	execDriverPath       = dockerBasePath + "/execdriver/native"
 	volumesConfigPath    = dockerBasePath + "/volumes"
 	volumesConfigPath    = dockerBasePath + "/volumes"
 	volumesStoragePath   = dockerBasePath + "/vfs/dir"
 	volumesStoragePath   = dockerBasePath + "/vfs/dir"
 	containerStoragePath = dockerBasePath + "/containers"
 	containerStoragePath = dockerBasePath + "/containers"
 
 
+	runtimePath    = "/var/run/docker"
+	execDriverPath = runtimePath + "/execdriver/native"
+
 	workingDirectory string
 	workingDirectory string
 )
 )