Merge pull request #590 from tonistiigi/fix-oomscoreadj
Fix setting OomScoreAdj from OCI spec
This commit is contained in:
commit
8f7d5fe376
3
spec.go
3
spec.go
|
@ -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))
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue