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>
This commit is contained in:
Stepan Stipl 2016-08-31 18:30:29 +01:00 committed by Joffrey F
parent f051f7e90a
commit 7ef48c3769
2 changed files with 1 additions and 6 deletions

View File

@ -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:

View File

@ -365,9 +365,6 @@ class CreateContainerTest(BaseAPIIntegrationTest):
self.assertRaises(TypeError,
self.client.create_host_config, mem_swappiness='40')
self.assertRaises(ValueError,
self.client.create_host_config, pid_mode='40')
def test_create_with_environment_variable_no_value(self):
container = self.client.create_container(
BUSYBOX,