Add OomScoreAdj to configure container oom killer preferences

libcontainer v0.0.4 introduces setting `/proc/self/oom_score_adj` to
better tune oom killing preferences for container process. This patch
simply integrates OomScoreAdj libcontainer's config option and adjust
the cli with this new option.

Signed-off-by: Antonio Murdaca <amurdaca@redhat.com>
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: e9287cd43a
Component: cli
This commit is contained in:
Antonio Murdaca
2017-06-02 00:07:19 +00:00
committed by Tibor Vass
parent 16c00f11eb
commit 98ddc49784
6 changed files with 12 additions and 0 deletions
@@ -58,6 +58,7 @@ Creates a new container.
--name="" Assign a name to the container
--net="default" Set the Network mode for the container
--oom-kill-disable=false Whether to disable OOM Killer for the container or not
--oom-score-adj=0 Tune the host's OOM preferences for containers (accepts -1000 to 1000)
-P, --publish-all=false Publish all exposed ports to random ports
-p, --publish=[] Publish a container's port(s) to the host
--pid="" PID namespace to use
@@ -62,6 +62,7 @@ parent = "smn_cli"
'host': use the host network stack inside the container
'NETWORK': connects the container to user-created network using `docker network create` command
--oom-kill-disable=false Whether to disable OOM Killer for the container or not
--oom-score-adj=0 Tune the host's OOM preferences for containers (accepts -1000 to 1000)
-P, --publish-all=false Publish all exposed ports to random ports
-p, --publish=[] Publish a container's port(s) to the host
--pid="" PID namespace to use