summaryrefslogtreecommitdiff
path: root/docker
diff options
context:
space:
mode:
authorStepan Stipl <stepan@stipl.net>2016-08-31 18:30:29 +0100
committerJoffrey F <joffrey@docker.com>2016-11-28 11:42:00 -0800
commit7ef48c3769cc42115b59157847275b2d072d7e5f (patch)
treef9bd81f7f27ae020cc7d813f32ecfd6eef6d8ac6 /docker
parentf051f7e90a26e83e1ea5ae2957fa4c3602a07eca (diff)
downloaddocker-py-7ef48c3769cc42115b59157847275b2d072d7e5f.tar.gz
Allow custom PID mode for the container
Docker added support for sharing PID namespaces with other containers since version 1.12 (see https://github.com/docker/docker/pull/22481). Signed-off-by: Stepan Stipl <stepan@stipl.net>
Diffstat (limited to 'docker')
-rw-r--r--docker/utils/utils.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/docker/utils/utils.py b/docker/utils/utils.py
index b107f22..f4ad6f8 100644
--- a/docker/utils/utils.py
+++ b/docker/utils/utils.py
@@ -735,9 +735,7 @@ def create_host_config(binds=None, port_bindings=None, lxc_conf=None,
host_config['ShmSize'] = shm_size
- if pid_mode not in (None, 'host'):
- raise host_config_value_error('pid_mode', pid_mode)
- elif pid_mode:
+ if pid_mode:
host_config['PidMode'] = pid_mode
if ipc_mode: