-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Closed
Labels
Description
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.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-compose version 2.34.0
Docker Environment
docker version 28.0.4
Anything else?
No response
czpython, stefanfoulis, Drauna, samongoose, frost-nzcr4 and 1 more