Skip to content

Commit

Permalink
Fixes containers#908: Add support for multi-line environment files
Browse files Browse the repository at this point in the history
Signed-off-by: Hedayat Vatankhah <[email protected]>
  • Loading branch information
hedayat committed Apr 8, 2024
1 parent e893d06 commit 010c05a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion podman_compose.py
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down

0 comments on commit 010c05a

Please sign in to comment.