From 3d98a03c30a6665da7287b3b6252e5a7ea5385cb Mon Sep 17 00:00:00 2001 From: Bernd Schoolmann Date: Sat, 29 Jan 2022 23:45:25 +0100 Subject: [PATCH] FIXES #413: parse network_mode: container:container_name correctly Signed-off-by: Bernd Schoolmann --- podman_compose.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/podman_compose.py b/podman_compose.py index 03866c19..df2de314 100755 --- a/podman_compose.py +++ b/podman_compose.py @@ -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