@@ -18,7 +18,7 @@ def build(self, path=None, tag=None, quiet=False, fileobj=None,
18
18
forcerm = False , dockerfile = None , container_limits = None ,
19
19
decode = False , buildargs = None , gzip = False , shmsize = None ,
20
20
labels = None , cache_from = None , target = None , network_mode = None ,
21
- squash = None , extra_hosts = None , platform = None ):
21
+ squash = None , extra_hosts = None , platform = None , isolation = None ):
22
22
"""
23
23
Similar to the ``docker build`` command. Either ``path`` or ``fileobj``
24
24
needs to be set. ``path`` can be a local path (to a directory
@@ -100,6 +100,8 @@ def build(self, path=None, tag=None, quiet=False, fileobj=None,
100
100
extra_hosts (dict): Extra hosts to add to /etc/hosts in building
101
101
containers, as a mapping of hostname to IP address.
102
102
platform (str): Platform in the format ``os[/arch[/variant]]``
103
+ isolation (str): Isolation technology used during build.
104
+ Default: `None`.
103
105
104
106
Returns:
105
107
A generator for the build output.
@@ -232,6 +234,13 @@ def build(self, path=None, tag=None, quiet=False, fileobj=None,
232
234
)
233
235
params ['platform' ] = platform
234
236
237
+ if isolation is not None :
238
+ if utils .version_lt (self ._version , '1.24' ):
239
+ raise errors .InvalidVersion (
240
+ 'isolation was only introduced in API version 1.24'
241
+ )
242
+ params ['isolation' ] = isolation
243
+
235
244
if context is not None :
236
245
headers = {'Content-Type' : 'application/tar' }
237
246
if encoding :
0 commit comments