From d983056982b896d4714f39f06fb752dba8263b5c Mon Sep 17 00:00:00 2001 From: ohxodi Date: Fri, 29 Apr 2022 14:02:02 +0200 Subject: [PATCH] Update external volume name management --- podman_compose.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/podman_compose.py b/podman_compose.py index bba3f4c..6f6e8f2 100755 --- a/podman_compose.py +++ b/podman_compose.py @@ -190,9 +190,9 @@ def fix_mount_dict(compose, mount_dict, proj_name, srv_name): elif not name: external = vol.get("external", None) ext_name = ( - external.get("name", None) if isinstance(external, dict) else None + external.get("name", f"{source}") if isinstance(external, dict) else None ) - vol["name"] = ext_name if ext_name else f"{source}" + vol["name"] = ext_name if ext_name else f"{proj_name}_{source}" return mount_dict