mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Daemon: passdown the --oom-kill-disable
option to containerd
Current implementaion of docke daemon doesn't pass down the `--oom-kill-disable` option specified by the end user to the containerd when spawning a new docker instance with help from `runc` component, which results in the `--oom-kill-disable` doesn't work no matter the flag is `true` or `false`. This PR will fix this issue reported by #36090 Signed-off-by: Dennis Chen <dennis.chen@arm.com> Signed-off-by: Jianyong Wu <jianyong.wu@arm.com>
This commit is contained in:
parent
6e5c2d639f
commit
44b074d199
1 changed files with 4 additions and 0 deletions
|
@ -103,6 +103,10 @@ func getMemoryResources(config containertypes.Resources) *specs.LinuxMemory {
|
|||
memory.Swappiness = &swappiness
|
||||
}
|
||||
|
||||
if config.OomKillDisable != nil {
|
||||
memory.DisableOOMKiller = config.OomKillDisable
|
||||
}
|
||||
|
||||
if config.KernelMemory != 0 {
|
||||
memory.Kernel = &config.KernelMemory
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue