-
Notifications
You must be signed in to change notification settings - Fork 5.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] env_file directive in include does not affect interpolation for service env_file #11741
Comments
Note: this require we re-implement |
Got something similar here but not using Exemple :
Are using default values defined in Variables from
@ShadowLNC could you try without include to check if interpolation is working with an env file different from Compose version :
|
@clementgoclock this is a distinct issue, please fill another one so we can track it. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as not stale anymore due to the recent activity. |
Description
Within an
include
directive, I can specify anenv_file
. This changes interpolation for the included YAML, but if that YAML file has aservice
with anenv_file
, that environment file doesn't have its interpolation changed, and I believe it should.Steps To Reproduce
docker-compose.yml
include.compose.yml
.env
extras.env
fakefile.env
Then, I run
docker compose up
to see the environment:docker compose up
(breaksextras.env
)The
extras.env
file is missing from the env file interpolation step, but present on the YAML interpolation.docker compose --env-file=extras.env up
(breaks.env
)The
.env
file is missing from the env file interpolation step, but present on the YAML interpolation.In both cases I would expect both files (
.env
andextras.env
) to be used because of theenv_file
directive underinclude
, irrespective of the CLI--env-file
argument. My expectation holds true for the YAML interpolation, but not when interpolating an environment file referenced by the YAML file.Compose Version
Docker Environment
docker info
Anything else?
No response
The text was updated successfully, but these errors were encountered: