Merge "Add option to configure uts namespace"

This commit is contained in:
Zuul 2017-10-24 05:52:33 +00:00 committed by Gerrit Code Review
commit ecd4360f4b
4 changed files with 11 additions and 1 deletions

View File

@ -263,6 +263,9 @@ net:
pid:
String. Set the PID mode for the container.
uts:
String. Set the UTS namespace for the container.
privileged:
Boolean, defaults to false. If true, give extended privileges to this container.

View File

@ -151,6 +151,8 @@ class ComposeV1Builder(object):
cmd.append('--ipc=%s' % cconfig['ipc'])
if 'pid' in cconfig:
cmd.append('--pid=%s' % cconfig['pid'])
if 'uts' in cconfig:
cmd.append('--uts=%s' % cconfig['uts'])
if 'healthcheck' in cconfig:
hconfig = cconfig['healthcheck']
if 'test' in hconfig:

View File

@ -316,6 +316,7 @@ three-12345678 three''', '', 0),
'net': 'host',
'ipc': 'host',
'pid': 'container:bar',
'uts': 'host',
'restart': 'always',
'healthcheck': {
'test': '/bin/true',
@ -335,7 +336,7 @@ three-12345678 three''', '', 0),
['docker', 'run', '--name', 'one',
'--detach=true', '--env-file=/tmp/foo.env',
'--net=host', '--ipc=host', '--pid=container:bar',
'--health-cmd=/bin/true', '--health-interval=30s',
'--uts=host', '--health-cmd=/bin/true', '--health-interval=30s',
'--health-timeout=10s', '--health-retries=3',
'--privileged=true', '--restart=always', '--user=bar',
'--log-opt=tag={{.ImageName}}/{{.Name}}/{{.ID}}', 'centos:7'],

View File

@ -0,0 +1,4 @@
---
features:
- |
Add option to configure container's UTS namespace.