From 010c05a4cc436fdc200da179515d5f284b3120fc Mon Sep 17 00:00:00 2001 From: Hedayat Vatankhah Date: Tue, 9 Apr 2024 01:13:33 +0330 Subject: [PATCH] Fixes #908: Add support for multi-line environment files Signed-off-by: Hedayat Vatankhah --- podman_compose.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/podman_compose.py b/podman_compose.py index 9c9a683..7c2c70f 100755 --- a/podman_compose.py +++ b/podman_compose.py @@ -987,7 +987,12 @@ async def container_to_args(compose, cnt, detached=True): env_file = [env_file] for i in env_file: i = os.path.realpath(os.path.join(dirname, i)) - podman_args.extend(["--env-file", i]) + dotenv_dict = {} + dotenv_dict = dotenv_to_dict(i) + env = norm_as_list(dotenv_dict) + for e in env: + podman_args.extend(["-e", e]) + env = norm_as_list(cnt.get("environment", {})) for e in env: podman_args.extend(["-e", e])