Fix multi-interface port binding.
This commit is contained in:
parent
bd3e1c77fe
commit
030dcccad4
1 changed files with 2 additions and 2 deletions
|
@ -1410,7 +1410,7 @@ class Container(DockerBaseClass):
|
|||
return entrypoint
|
||||
|
||||
def _get_expected_ports(self):
|
||||
if self.parameters.published_ports is None:
|
||||
if not self.parameters.published_ports:
|
||||
return None
|
||||
expected_bound_ports = {}
|
||||
for container_port, config in self.parameters.published_ports.iteritems():
|
||||
|
@ -1420,7 +1420,7 @@ class Container(DockerBaseClass):
|
|||
expected_bound_ports[container_port] = [{'HostIp': "0.0.0.0", 'HostPort': ""}]
|
||||
elif isinstance(config[0], tuple):
|
||||
expected_bound_ports[container_port] = []
|
||||
for host_ip, host_port in config.iteritems():
|
||||
for host_ip, host_port in config:
|
||||
expected_bound_ports[container_port].append({ 'HostIp': host_ip, 'HostPort': str(host_port)})
|
||||
else:
|
||||
expected_bound_ports[container_port] = [{'HostIp': config[0], 'HostPort': str(config[1])}]
|
||||
|
|
Loading…
Reference in a new issue