Implement group_add
This is part of the compose v2 spec, and may prove useful to allowing the mistral-executor container to have membership to the docker group Blueprint: container-prepare-workflow Change-Id: Id4b4b7897d8f7da4eda33c1e5187514c234f3a79
This commit is contained in:
parent
bfeb2446bd
commit
56d6230002
|
@ -199,6 +199,7 @@ class ComposeV1Builder(object):
|
|||
self.string_arg(cconfig, cmd, 'privileged', '--privileged', lower)
|
||||
self.string_arg(cconfig, cmd, 'restart', '--restart')
|
||||
self.string_arg(cconfig, cmd, 'user', '--user')
|
||||
self.list_arg(cconfig, cmd, 'group_add', '--group-add')
|
||||
self.list_arg(cconfig, cmd, 'volumes', '--volume')
|
||||
self.list_arg(cconfig, cmd, 'volumes_from', '--volumes-from')
|
||||
# TODO(sbaker): deprecate log_tag, implement log_driver, log_opt
|
||||
|
|
|
@ -484,7 +484,8 @@ three-12345678 three''', '', 0),
|
|||
'env_file': ['/tmp/foo.env', '/tmp/bar.env'],
|
||||
'ulimit': ['nofile=1024', 'nproc=1024'],
|
||||
'volumes': ['/foo:/foo:rw', '/bar:/bar:ro'],
|
||||
'volumes_from': ['two', 'three']
|
||||
'volumes_from': ['two', 'three'],
|
||||
'group_add': ['docker', 'zuul']
|
||||
}
|
||||
}
|
||||
builder = compose1.ComposeV1Builder('foo', config, None)
|
||||
|
@ -497,6 +498,7 @@ three-12345678 three''', '', 0),
|
|||
'--env=FOO=BAR', '--env=BAR=BAZ',
|
||||
'--rm', '--interactive', '--tty',
|
||||
'--ulimit=nofile=1024', '--ulimit=nproc=1024',
|
||||
'--group-add=docker', '--group-add=zuul',
|
||||
'--volume=/foo:/foo:rw', '--volume=/bar:/bar:ro',
|
||||
'--volumes-from=two', '--volumes-from=three',
|
||||
'centos:7', 'ls', '-l', '/foo'],
|
||||
|
|
Loading…
Reference in New Issue