@@ -444,7 +444,7 @@ def create_container(self, image, command=None, hostname=None, user=None,
444
444
network_disabled = False , name = None , entrypoint = None ,
445
445
cpu_shares = None , working_dir = None , domainname = None ,
446
446
memswap_limit = 0 , cpuset = None , host_config = None ,
447
- mac_address = None , labels = None , security_opt = None ):
447
+ mac_address = None , labels = None ):
448
448
449
449
if isinstance (volumes , six .string_types ):
450
450
volumes = [volumes , ]
@@ -458,8 +458,7 @@ def create_container(self, image, command=None, hostname=None, user=None,
458
458
self ._version , image , command , hostname , user , detach , stdin_open ,
459
459
tty , mem_limit , ports , environment , dns , volumes , volumes_from ,
460
460
network_disabled , entrypoint , cpu_shares , working_dir , domainname ,
461
- memswap_limit , cpuset , host_config , mac_address , labels ,
462
- security_opt
461
+ memswap_limit , cpuset , host_config , mac_address , labels
463
462
)
464
463
return self .create_container_from_config (config , name )
465
464
@@ -883,6 +882,12 @@ def start(self, container, binds=None, port_bindings=None, lxc_conf=None,
883
882
'volumes_from is only supported for API version >= 1.10'
884
883
)
885
884
885
+ if utils .compare_version ('1.15' , self ._version ) < 0 :
886
+ if security_opt is not None :
887
+ raise errors .InvalidVersion (
888
+ 'security_opt is only supported for API version >= 1.15'
889
+ )
890
+
886
891
if utils .compare_version ('1.17' , self ._version ) < 0 :
887
892
if read_only is not None :
888
893
raise errors .InvalidVersion (
0 commit comments