Skip to content

Commit

Permalink
Merge pull request #2171 from sarthurdev/T5463_fix
Browse files Browse the repository at this point in the history
container: T5463: Fixes indentation to publish all port nodes
  • Loading branch information
c-po authored Aug 25, 2023
2 parents 5ea0428 + 14c7264 commit 2d29337
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/conf_mode/container.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ''
Expand Down

0 comments on commit 2d29337

Please sign in to comment.