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
{{ message }}
Repository navigation
[BUG] env_file is not loaded in docker compose (v2.34.0) for services with profiles #12644
In Docker Compose version 2.34.0, environment variables defined in an env_file are no longer loaded when running a service using docker compose run <service name>, specifically for services that have profiles:, if profile is not enabled explicitly via COMPOSE_PROFILES or --profile. In version 2.33.1, the variables were correctly loaded.
changed the title [-][BUG] `env_file` is Not Loaded in `docker compose` (v2.34.0) for Services with Profiles[/-][+][BUG] `env_file` is not loaded in `docker compose` (v2.34.0) for services with profiles[/+]on Mar 18, 2025
The issue still exists as of v2.34.0, compose doesn't respect env_file when there's a profile section
@Aden-Q : I believe that is expected. I think v2.34.0 is the release in which this bug was first introduced. Presumably it will be fixed in the next release.
Activity
codingjerk commentedon Mar 18, 2025
@ndeloof Issue was probably introduced here
[-][BUG] `env_file` is Not Loaded in `docker compose` (v2.34.0) for Services with Profiles[/-][+][BUG] `env_file` is not loaded in `docker compose` (v2.34.0) for services with profiles[/+]lily-controlzee commentedon Mar 21, 2025
thanks for reporting. I just encountered the same issue and you saved me the trouble of making a repro
Aden-Q commentedon Mar 25, 2025
The issue still exists as of
v2.34.0, compose doesn't respectenv_filewhen there's aprofilesectiondavidrunger commentedon Mar 25, 2025
@Aden-Q : I believe that is expected. I think
v2.34.0is the release in which this bug was first introduced. Presumably it will be fixed in the next release.StefanWetterActiware commentedon Mar 26, 2025
Does anyone know when a release fixing this bug will be available?
aukaost commentedon Mar 29, 2025
Getting a release out for this issue would be most appreciated.
davidrunger commentedon Apr 17, 2025
v2.35.0 is now available, which includes a fix for this bug.