@@ -110,7 +110,7 @@ def _container_config(self, image, command, hostname=None, user=None,
110
110
network_disabled = False , entrypoint = None ,
111
111
cpu_shares = None , working_dir = None ,
112
112
domainname = None , memswap_limit = 0 , cpuset = None ,
113
- host_config = None ):
113
+ host_config = None , mac_address = None ):
114
114
if isinstance (command , six .string_types ):
115
115
command = shlex .split (str (command ))
116
116
if isinstance (environment , dict ):
@@ -227,7 +227,8 @@ def _container_config(self, image, command, hostname=None, user=None,
227
227
'Cpuset' : cpuset ,
228
228
'WorkingDir' : working_dir ,
229
229
'MemorySwap' : memswap_limit ,
230
- 'HostConfig' : host_config
230
+ 'HostConfig' : host_config ,
231
+ 'MacAddress' : mac_address
231
232
}
232
233
233
234
def _post_json (self , url , data , ** kwargs ):
@@ -539,7 +540,8 @@ def create_container(self, image, command=None, hostname=None, user=None,
539
540
volumes = None , volumes_from = None ,
540
541
network_disabled = False , name = None , entrypoint = None ,
541
542
cpu_shares = None , working_dir = None , domainname = None ,
542
- memswap_limit = 0 , cpuset = None , host_config = None ):
543
+ memswap_limit = 0 , cpuset = None , host_config = None ,
544
+ mac_address = None ):
543
545
544
546
if isinstance (volumes , six .string_types ):
545
547
volumes = [volumes , ]
@@ -551,7 +553,7 @@ def create_container(self, image, command=None, hostname=None, user=None,
551
553
image , command , hostname , user , detach , stdin_open , tty , mem_limit ,
552
554
ports , environment , dns , volumes , volumes_from , network_disabled ,
553
555
entrypoint , cpu_shares , working_dir , domainname ,
554
- memswap_limit , cpuset , host_config
556
+ memswap_limit , cpuset , host_config , mac_address
555
557
)
556
558
return self .create_container_from_config (config , name )
557
559
0 commit comments