daemon: ensure we set default options to stock runtime

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
(cherry picked from commit 59162641cc)
Signed-off-by: Tibor Vass <tibor@docker.com>
This commit is contained in:
Antonio Murdaca 2016-07-08 15:58:06 +02:00 committed by Tibor Vass
parent 234861710f
commit 52ca6cb63a

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
}