summaryrefslogtreecommitdiff
path: root/src/conf_mode
diff options
context:
space:
mode:
authorsarthurdev <965089+sarthurdev@users.noreply.github.com>2023-08-25 15:40:16 +0200
committersarthurdev <965089+sarthurdev@users.noreply.github.com>2023-08-25 15:41:04 +0200
commit14c7264de462b6ccfcb69688434f357abbf1d42a (patch)
tree663795ac1966e42d87f35c764730252bbb2b4183 /src/conf_mode
parent5ea0428a08ae9e85fe2ebb6bb85dca07c5eb694f (diff)
downloadvyos-1x-14c7264de462b6ccfcb69688434f357abbf1d42a.tar.gz
vyos-1x-14c7264de462b6ccfcb69688434f357abbf1d42a.zip
container: T5463: Fix iteration to publish all port nodes
Diffstat (limited to 'src/conf_mode')
-rwxr-xr-xsrc/conf_mode/container.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/conf_mode/container.py b/src/conf_mode/container.py
index 754742c37..79b605ffb 100755
--- a/src/conf_mode/container.py
+++ b/src/conf_mode/container.py
@@ -283,13 +283,13 @@ def generate_run_arguments(name, container_config):
dport = container_config['port'][portmap]['destination']
listen_addresses = container_config['port'][portmap].get('listen_address', [])
- # If listen_addresses is not empty, include them in the publish command
- if listen_addresses:
- for listen_address in listen_addresses:
- port += f' --publish {bracketize_ipv6(listen_address)}:{sport}:{dport}/{protocol}'
- else:
- # If listen_addresses is empty, just include the standard publish command
- port += f' --publish {sport}:{dport}/{protocol}'
+ # If listen_addresses is not empty, include them in the publish command
+ if listen_addresses:
+ for listen_address in listen_addresses:
+ port += f' --publish {bracketize_ipv6(listen_address)}:{sport}:{dport}/{protocol}'
+ else:
+ # If listen_addresses is empty, just include the standard publish command
+ port += f' --publish {sport}:{dport}/{protocol}'
# Bind volume
volume = ''