@@ -550,8 +550,8 @@ def create_container(self, image, command=None, hostname=None, user=None,
550
550
config = self ._container_config (
551
551
image , command , hostname , user , detach , stdin_open , tty , mem_limit ,
552
552
ports , environment , dns , volumes , volumes_from , network_disabled ,
553
- entrypoint , cpu_shares , working_dir , domainname ,
554
- memswap_limit , cpuset , host_config , mac_address
553
+ entrypoint , cpu_shares , working_dir , domainname , memswap_limit ,
554
+ cpuset , host_config , mac_address
555
555
)
556
556
return self .create_container_from_config (config , name )
557
557
@@ -957,7 +957,7 @@ def start(self, container, binds=None, port_bindings=None, lxc_conf=None,
957
957
publish_all_ports = False , links = None , privileged = False ,
958
958
dns = None , dns_search = None , volumes_from = None , network_mode = None ,
959
959
restart_policy = None , cap_add = None , cap_drop = None , devices = None ,
960
- extra_hosts = None , read_only = None ):
960
+ extra_hosts = None , read_only = None , pid_mode = None ):
961
961
962
962
if utils .compare_version ('1.10' , self ._version ) < 0 :
963
963
if dns is not None :
@@ -969,19 +969,23 @@ def start(self, container, binds=None, port_bindings=None, lxc_conf=None,
969
969
'volumes_from is only supported for API version >= 1.10'
970
970
)
971
971
972
- if utils .compare_version ('1.17' , self ._version ) < 0 and \
973
- read_only is not None :
974
- raise errors .InvalidVersion (
975
- 'read_only is only supported for API version >= 1.17'
976
- )
972
+ if utils .compare_version ('1.17' , self ._version ) < 0 :
973
+ if read_only is not None :
974
+ raise errors .InvalidVersion (
975
+ 'read_only is only supported for API version >= 1.17'
976
+ )
977
+ if pid_mode is not None :
978
+ raise errors .InvalidVersion (
979
+ 'pid_mode is only supported for API version >= 1.17'
980
+ )
977
981
978
982
start_config = utils .create_host_config (
979
983
binds = binds , port_bindings = port_bindings , lxc_conf = lxc_conf ,
980
984
publish_all_ports = publish_all_ports , links = links , dns = dns ,
981
985
privileged = privileged , dns_search = dns_search , cap_add = cap_add ,
982
986
cap_drop = cap_drop , volumes_from = volumes_from , devices = devices ,
983
987
network_mode = network_mode , restart_policy = restart_policy ,
984
- extra_hosts = extra_hosts , read_only = read_only
988
+ extra_hosts = extra_hosts , read_only = read_only , pid_mode = pid_mode
985
989
)
986
990
987
991
if isinstance (container , dict ):
0 commit comments