Description
The environment variables under env_file are ignored. When environment variables are set under the environment attribute.
Related issue on stack overflow
This was working on Docker Compose version 2.28.1
Steps To Reproduce
- Running on M1 Mac
- docker-compose version 2.34.0, docker version 28.0.4
.env
FRUIT=APPLE
---
docker-compose.yml
my-service:
image: python:3.13.2-alpine3.21
env_file:
- .env
environment:
TZ: Europe/London
- In a directory running -
dcp run my-service. The environment variables in .env are ignored. The environment variables set under the environment are there.
What I expect is for the environemnt variables to be interpolated so that they all exist.
Compose Version
docker-compose version 2.34.0
Docker Environment
Anything else?
No response
Description
The environment variables under
env_fileare ignored. When environment variables are set under theenvironmentattribute.Related issue on stack overflow
This was working on Docker Compose version 2.28.1
Steps To Reproduce
dcp run my-service. The environment variables in.envare ignored. The environment variables set under theenvironmentare there.What I expect is for the environemnt variables to be interpolated so that they all exist.
Compose Version
Docker Environment
Anything else?
No response