Skip to content

Support variable interpolation in service env_file files#1510

Open
mokibit wants to merge 1 commit into
containers:mainfrom
mokibit:env-file-interpolation
Open

Support variable interpolation in service env_file files#1510
mokibit wants to merge 1 commit into
containers:mainfrom
mokibit:env-file-interpolation

Conversation

@mokibit

@mokibit mokibit commented Jul 19, 2026

Copy link
Copy Markdown
Collaborator

Before service-level env_file files did not interpolate variables from the project's .env file (or --env-file), and the $VAR syntax (without braces) was completely unsupported.
Now both ${VAR} and $VAR syntaxes work in service env_file files, with compose-level variables available for interpolation. This aligns podman-compose behavior with Docker Compose.

Fixes #848.

Before service-level `env_file` files did not interpolate variables from
the project's `.env` file (or `--env-file`), and the `$VAR` syntax
(without braces) was completely unsupported.
Now both `${VAR}` and `$VAR` syntaxes work in service `env_file` files,
with compose-level variables available for interpolation. This aligns
`podman-compose` behavior with Docker Compose.

Signed-off-by: Monika Kairaityte <monika@kibit.lt>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

env_file: does not match docker-compose's behavior

1 participant