Merge pull request #1737 from larsks/feature/docker-allow-empty-pid

docker: permit empty or false pid
This commit is contained in:
Brian Coca 2015-07-15 23:05:43 -04:00
commit 2790af2858

View file

@ -1270,6 +1270,10 @@ class DockerManager(object):
if params['restart_policy']['Name'] == 'on-failure':
params['restart_policy']['MaximumRetryCount'] = optionals['restart_policy_retry']
# docker_py only accepts 'host' or None
if 'pid' in optionals and not optionals['pid']:
optionals['pid'] = None
if optionals['pid'] is not None:
self.ensure_capability('pid')
params['pid_mode'] = optionals['pid']