You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for the report. We have dramatically improved the environment variable logic in recent releases and fixed some long outstanding issues (see #9636).
This issue should now be fixed in the latest releases:
# docker compose version --short
2.10.1
# docker compose run app
ENV_LOCAL_FILE_VAR=2
ENV_FILE_VAR=1
ENV_BOTH_FILE_VAR=2
For Docker Desktop users, Compose v2.10.1 will ship with the next release.
Description
I have an issue with a list of env files in docker-compose.yml
Based on the documentation I expect another behaviour. Documentation says this
But for some reason variable defined in
.env
is never overwritten.I have these files
docker-compose.yml
.env
.env.local
Steps to reproduce the issue:
docker-compose up -d
docker-compose run app env
Describe the results you received:
Env variables inside the container look
Describe the results you expected:
Env variables inside the container should look like
Additional information you deem important (e.g. issue happens only occasionally):
Output of
docker compose version
:Output of
docker info
:Additional environment details:
The text was updated successfully, but these errors were encountered: