Skip to content

Commit

Permalink
FIXES #413: parse network_mode: container:container_name correctly
Browse files Browse the repository at this point in the history
Signed-off-by: Bernd Schoolmann <mail@quexten.com>
  • Loading branch information
quexten authored and muayyad-alsadi committed Jan 30, 2022
1 parent 09c6cbe commit 536925c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions podman_compose.py
Original file line number Diff line number Diff line change
Expand Up @@ -620,6 +620,9 @@ def get_net_args(compose, cnt):
other_srv = net.split(":", 1)[1].strip()
other_cnt = compose.container_names_by_service[other_srv][0]
return ['--network', f"container:{other_cnt}"]
if net.startswith("container:"):
other_cnt = net.split(":",1)[1].strip()
return ['--network', f"container:{other_cnt}"]
proj_name = compose.project_name
default_net = compose.default_net
nets = compose.networks
Expand Down

0 comments on commit 536925c

Please sign in to comment.