Merge pull request #3991 from shin-/3906-isolation-config
Add support for "isolation" in config
This commit is contained in:
commit
a5c1e4b0cd
4 changed files with 71 additions and 2 deletions
|
|
@ -123,6 +123,7 @@
|
|||
"hostname": {"type": "string"},
|
||||
"image": {"type": "string"},
|
||||
"ipc": {"type": "string"},
|
||||
"isolation": {"type": "string"},
|
||||
"labels": {"$ref": "#/definitions/list_or_dict"},
|
||||
"links": {"type": "array", "items": {"type": "string"}, "uniqueItems": true},
|
||||
|
||||
|
|
|
|||
|
|
@ -682,7 +682,7 @@ class Service(object):
|
|||
logging_dict = options.get('logging', None)
|
||||
log_config = get_log_config(logging_dict)
|
||||
|
||||
return self.client.create_host_config(
|
||||
host_config = self.client.create_host_config(
|
||||
links=self._get_links(link_to_self=one_off),
|
||||
port_bindings=build_port_bindings(options.get('ports') or []),
|
||||
binds=options.get('binds'),
|
||||
|
|
@ -713,6 +713,12 @@ class Service(object):
|
|||
group_add=options.get('group_add')
|
||||
)
|
||||
|
||||
# TODO: Add as an argument to create_host_config once it's supported
|
||||
# in docker-py
|
||||
host_config['Isolation'] = options.get('isolation')
|
||||
|
||||
return host_config
|
||||
|
||||
def build(self, no_cache=False, pull=False, force_rm=False):
|
||||
log.info('Building %s' % self.name)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue