Merge pull request #24450 from runcom/fix-systemd-defaultRuntime

daemon: ensure we set default options to stock runtime
This commit is contained in:
Alexander Morozov 2016-07-08 08:52:18 -07:00 committed by GitHub
commit 9d10221a1c

View file

@ -579,7 +579,11 @@ func verifyDaemonSettings(config *Config) error {
if config.Runtimes == nil {
config.Runtimes = make(map[string]types.Runtime)
}
config.Runtimes[stockRuntimeName] = types.Runtime{Path: DefaultRuntimeBinary}
stockRuntimeOpts := []string{}
if UsingSystemd(config) {
stockRuntimeOpts = append(stockRuntimeOpts, "--systemd-cgroup=true")
}
config.Runtimes[stockRuntimeName] = types.Runtime{Path: DefaultRuntimeBinary, Args: stockRuntimeOpts}
return nil
}