Skip to content

Clarify dual .env file precedence behavior#25394

Closed
devendrakushwah80 wants to merge 1 commit into
docker:mainfrom
devendrakushwah80:fix-dual-env-precedence-docs
Closed

Clarify dual .env file precedence behavior#25394
devendrakushwah80 wants to merge 1 commit into
docker:mainfrom
devendrakushwah80:fix-dual-env-precedence-docs

Conversation

@devendrakushwah80

Copy link
Copy Markdown
Contributor

Adds a note to the environment variable precedence documentation clarifying that Docker Compose can load both a local .env file and a project-directory .env file.

The note explains which file takes precedence and links to the existing detailed explanation in variable-interpolation.md, helping readers understand the dual .env file scenario without duplicating content.

Related issues or tickets

Fixes #25320

Reviews

Technical review

Editorial review

Product review

@netlify

netlify Bot commented Jun 18, 2026

Copy link
Copy Markdown

Deploy Preview for docsdocker ready!

Name Link
🔨 Latest commit 6bb0311
🔍 Latest deploy log https://app.netlify.com/projects/docsdocker/deploys/6a340c535c1cdf0008d33198
😎 Deploy Preview https://deploy-preview-25394--docsdocker.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions github-actions Bot added the area/compose Relates to docker-compose.yml spec or docker-compose binary label Jun 18, 2026
@aevesdocker aevesdocker mentioned this pull request Jun 22, 2026
3 tasks
aevesdocker added a commit that referenced this pull request Jun 22, 2026
<!--Delete sections as needed -->

## Description

Fixes #25400
Fixes #25399
Fixes #25281
Fixes #25320 and replaces
#25394

## Related issues or tickets

<!-- Related issues, pull requests, or Jira tickets -->

## Reviews

<!-- Notes for reviewers here -->
<!-- List applicable reviews (optionally @tag reviewers) -->

- [ ] Technical review
- [ ] Editorial review
- [ ] Product review

---------

Signed-off-by: aevesdocker <allie.sadler@docker.com>
@aevesdocker

Copy link
Copy Markdown
Contributor

thanks but not quite correct and no-longer needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/compose Relates to docker-compose.yml spec or docker-compose binary

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[docs-scanner] Environment variable precedence doesn't account for dual .env file scenario

2 participants