mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
Merge pull request #590 from tonistiigi/fix-oomscoreadj
Fix setting OomScoreAdj from OCI spec
This commit is contained in:
@@ -312,6 +312,9 @@ func createLibcontainerConfig(cgroupName string, spec *specs.LinuxSpec) (*config
|
||||
config.ProcessLabel = spec.Linux.SelinuxProcessLabel
|
||||
config.AppArmorProfile = spec.Linux.ApparmorProfile
|
||||
config.NoNewPrivileges = spec.Linux.NoNewPrivileges
|
||||
if oomScoreAdj := spec.Linux.Resources.OOMScoreAdj; oomScoreAdj != nil {
|
||||
config.OomScoreAdj = *oomScoreAdj
|
||||
}
|
||||
for _, g := range spec.Process.User.AdditionalGids {
|
||||
config.AdditionalGroups = append(config.AdditionalGroups, strconv.FormatUint(uint64(g), 10))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user