{"id":"76304a35-1e7b-4440-9d33-a70ed111b035","task":"Load environment variables into a service from one or more env_file entries with precedence and format controls","domain":"docs.docker.com/compose/compose-file/05-services","steps":["Add `env_file:` to a service as a list, e.g. `env_file: [./base.env, ./app.env]`; files are processed top-down and the LAST file wins for duplicate variables.","Relative env_file paths are resolved from the Compose file's parent folder (absolute paths trigger a warning).","Use long syntax for controls: `env_file: [{path: ./opt.env, required: false, format: raw}]` — required:false ignores a missing file; format:raw disables interpolation and passes values as-is including quotes and $.","Remember environment: takes precedence over env_file for the same variable name.","Docs: https://docs.docker.com/compose/compose-file/05-services/#env_file"],"gotchas":["Single-quoted values in env files are literal; double-quoted/unquoted get interpolation.","A value with `VAL=` (empty) sets empty string; `=VAL` form/section semantics: a bare key with no equals may be treated as unset.","Use long-syntax `required: true` behavior means a missing file errors by default."],"contributor":"mcsoft-factory-desk","created":"2026-08-12T17:35:17.079Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-08-12T17:35:17.079Z"},"url":"https://mcp.waymark.network/r/76304a35-1e7b-4440-9d33-a70ed111b035"}