Compose Down fails for projects started with multiple --env-file arguments
Maintainers usually reply within 1 day
@sylvesterkaczmarek is already working on this.
Since Nov 6, 2026.
- #654 by @sylvesterkaczmarek — open
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 75/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- docker-compose, typescript, vscode
- Domain
- devtools
Research direction
The issue traces the value through getComposeEnvFile and composeGroup, but does not name their source files or tests. Start by locating those entry points and checking how Compose Down builds its arguments from environmentFile. Preserve the label's file order while emitting one --env-file argument per path; verify the generated command with a regression test for two files.
Written by the indexing model from the issue text.
Description
When a Compose project is started with multiple environment files, selecting Compose Down from the project's context menu in the VS Code Containers view fails.
Container Tools reads the comma-separated com.docker.compose.project.environment_file label and passes its entire value as a single --env-file argument.
Steps to reproduce
- Start a Compose project with two environment files:
docker compose --env-file .env --env-file override.env up -d - Open the Containers view in VS Code.
- Right-click the running Compose project.
- Select Compose Down.
Actual behavior
The extension generates a command containing: --env-file '/path/to/.env,/path/to/override.env'
Compose treats this as a single filename and fails: couldn't find env file: /path/to/.env,/path/to/override.env
Expected behavior
The extension should handle multiple environment files and generate a separate argument for each: --env-file '/path/to/.env' --env-file '/path/to/override.env'
The original file order should be preserved so that environment variable precedence remains unchanged.
Investigation
The running containers have this label: com.docker.compose.project.environment_file=/path/to/.env,/path/to/override.env
In the installed extension bundle, getComposeEnvFile returns the label unchanged, and composeGroup passes that string as environmentFile.
Environment
Container Tools: 2.5.3 (ms-azuretools.vscode-containers)
Docker extension: 2.0.0 (ms-azuretools.vscode-docker)
Extension host: Linux, VS Code Server
Workaround
Run Compose Down manually with a separate --env-file argument for each file.
- Dominant language
- TypeScript
- Stars
- 147
- Forks
- 93
- Avg merge
- 9h 16m
- Merged PRs (30d)
- 14
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/vscode-containers
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
microsoft/vscode-containers#655 ·
Maintainers usually reply within 1 day
-
Add localization (i18n) support, starting with Simplified Chinese (zh-cn)Possibly taken @linghengqian claimed this 3 days ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 45/100
microsoft/vscode-containers#648 · 3 comments ·
Maintainers usually reply within 1 day
-
.NET AT-CTI blocked external
Difficulty 4/5 3-5 days Newbie friendliness 45/100
microsoft/vscode-containers#623 · 2 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
.NET AT-CTI blocked external
Difficulty 3/5 1-2 days Newbie friendliness 72/100
microsoft/vscode-containers#605 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
engineering
Difficulty 4/5 3-5 days Newbie friendliness 38/100
microsoft/vscode-containers#594 · 1 comment ·
Maintainers usually reply within 1 day
All issues in microsoft/vscode-containers
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
backnotprop/plannotator#2914 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
dsh-tauri-desk/deepseek-harness-desktop#1477 · 1 comment ·
-
[docs] RELEASE.md: wrong branch name, no check that the prepare PR merged with the right subject, manual publish stepPossibly taken @albertteoh claimed this today. Opendocumentation
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
jaegertracing/jaeger-ui#4739 ·
Maintainers usually reply within 1 day