From d50c8f437199a23d13ec356071a464d69175b2ff Mon Sep 17 00:00:00 2001 From: Matt Phillips Date: Fri, 29 Nov 2024 10:48:29 -0500 Subject: [PATCH] docker compat: use hyphens to join container names docker-compose uses - not _ to join container names to project. not a huge thing, but for services making assumptions based on this it can catch off guard, and is easy to make the same. --- podman_compose.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/podman_compose.py b/podman_compose.py index db6dc58..3fdfe69 100755 --- a/podman_compose.py +++ b/podman_compose.py @@ -1979,7 +1979,7 @@ def _parse_compose_file(self): container_names_by_service[service_name] = [] for num in range(1, replicas + 1): - name0 = f"{project_name}_{service_name}_{num}" + name0 = f"{project_name}-{service_name}-{num}" if num == 1: name = service_desc.get("container_name", name0) else: