Merge pull request #13086 from shishir-a412ed/docker_root_execdriver

root dir for execdriver (/var/run/docker) should be configurable
This commit is contained in:
David Calavera
2015-05-15 11:16:12 -07:00
5 changed files with 9 additions and 2 deletions
+3
View File
@@ -25,6 +25,7 @@ type CommonConfig struct {
DnsSearch []string
EnableCors bool
ExecDriver string
ExecRoot string
GraphDriver string
Labels []string
LogConfig runconfig.LogConfig
@@ -38,9 +39,11 @@ type CommonConfig struct {
// the current process.
// Subsequent calls to `flag.Parse` will populate config with values parsed
// from the command-line.
func (config *Config) InstallCommonFlags() {
flag.StringVar(&config.Pidfile, []string{"p", "-pidfile"}, defaultPidFile, "Path to use for daemon PID file")
flag.StringVar(&config.Root, []string{"g", "-graph"}, defaultGraph, "Root of the Docker runtime")
flag.StringVar(&config.ExecRoot, []string{"-exec-root"}, "/var/run/docker", "Root of the Docker execdriver")
flag.BoolVar(&config.AutoRestart, []string{"#r", "#-restart"}, true, "--restart on the daemon has been deprecated in favor of --restart policies on docker run")
flag.BoolVar(&config.Bridge.EnableIptables, []string{"#iptables", "-iptables"}, true, "Enable addition of iptables rules")
flag.BoolVar(&config.Bridge.EnableIpForward, []string{"#ip-forward", "-ip-forward"}, true, "Enable net.ipv4.ip_forward")
+1 -2
View File
@@ -911,8 +911,7 @@ func NewDaemon(config *Config, registryService *registry.Service) (daemon *Daemo
}
sysInfo := sysinfo.New(false)
const runDir = "/var/run/docker"
ed, err := execdrivers.NewDriver(config.ExecDriver, config.ExecOptions, runDir, config.Root, sysInitPath, sysInfo)
ed, err := execdrivers.NewDriver(config.ExecDriver, config.ExecOptions, config.ExecRoot, config.Root, sysInitPath, sysInfo)
if err != nil {
return nil, err
}