Merge pull request #590 from tonistiigi/fix-oomscoreadj

Fix setting OomScoreAdj from OCI spec
This commit is contained in:
Mrunal Patel 2016-02-28 21:52:21 -08:00
commit 8f7d5fe376
1 changed files with 3 additions and 0 deletions

View File

@ -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))
}