outposts: check if docker ports should be mapped before comparing ports
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
07267ac425
commit
e2f0a76309
|
@ -157,7 +157,7 @@ class DockerController(BaseController):
|
||||||
# {'HostIp': '::', 'HostPort': '389'}
|
# {'HostIp': '::', 'HostPort': '389'}
|
||||||
# ]}
|
# ]}
|
||||||
# If no ports are mapped (either mapping disabled, or host network)
|
# If no ports are mapped (either mapping disabled, or host network)
|
||||||
if not container.ports:
|
if not container.ports or not self.outpost.config.docker_map_ports:
|
||||||
return False
|
return False
|
||||||
for port in self.deployment_ports:
|
for port in self.deployment_ports:
|
||||||
key = f"{port.inner_port or port.port}/{port.protocol.lower()}"
|
key = f"{port.inner_port or port.port}/{port.protocol.lower()}"
|
||||||
|
|
Reference in a new issue