I suppose when starting application with docker compose -f compose.yaml -f local.yaml up interpolation happens before merging compose files.
Since that if compose.yaml has required environment variable which must be overrode by local.yaml, docker compose up will fail.
My expectation:
docker compose up will be applied to config from docker compose -f compose.yaml -f local.yaml config --no-interpolate.
Steps To Reproduce
Compose files:
#compose.yaml
services:
postgres:
image: postgres
environment:
POSTGRES_USER: ${PG_USER?PG_USER must be set}
POSTGRES_PASSWORD: ${PG_PASSWORD?PG_PASSWORD must be set}
POSTGRES_DB: ${PG_DB?PG_DB must be set}
Description
I suppose when starting application with
docker compose -f compose.yaml -f local.yaml up
interpolation happens before merging compose files.Since that if
compose.yaml
has required environment variable which must be overrode bylocal.yaml
,docker compose up
will fail.My expectation:
docker compose up
will be applied to config fromdocker compose -f compose.yaml -f local.yaml config --no-interpolate
.Steps To Reproduce
Compose files:
Merged config with no interpolation (which is what I want)
docker compose -f .\compose.yaml -f .\local.yaml config --no-interpolate
:What I get with
docker compose -f compose.yaml -f local.yaml up
:Compose Version
Docker Environment
Anything else?
No response