diff --git a/lib/galaxy/tool_util/deps/docker_util.py b/lib/galaxy/tool_util/deps/docker_util.py index dade02ba898..0c02636e06e 100644 --- a/lib/galaxy/tool_util/deps/docker_util.py +++ b/lib/galaxy/tool_util/deps/docker_util.py @@ -198,6 +198,11 @@ def parse_port_text(port_text): >>> slurm_ports[8888]['host'] '0.0.0.0' >>> ports = parse_port_text("5432/tcp -> :::5432") + >>> len(ports) + 0 + >>> ports_new = parse_port_text("5432/tcp -> [::]:5432") + >>> len(ports_new) + 0 """ ports = None if port_text is not None: @@ -207,7 +212,7 @@ def parse_port_text(port_text): raise Exception(f"Cannot parse host and port from line [{line}]") tool, host = line.split(" -> ", 1) hostname, port = host.rsplit(":", 1) - if hostname == "::": + if hostname in ["::", "[::]"]: # Skip unspecified IPv6 address, which is also specified as 0:0:0:0 in another line. # This is brittle of course, but so is parsing the container ports like this. continue