Merge pull request #24450 from runcom/fix-systemd-defaultRuntime
daemon: ensure we set default options to stock runtime
This commit is contained in:
commit
9d10221a1c
1 changed files with 5 additions and 1 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue