Merge pull request #1737 from larsks/feature/docker-allow-empty-pid
docker: permit empty or false pid
This commit is contained in:
commit
2790af2858
1 changed files with 4 additions and 0 deletions
|
@ -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']
|
||||
|
|
Loading…
Reference in a new issue