Fix setting OomScoreAdj from OCI spec

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
Tonis Tiigi 2016-02-25 12:01:18 -08:00
parent fc8c8ed9da
commit 30534f979b
1 changed files with 3 additions and 0 deletions

View File

@ -304,6 +304,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))
}