devcontainers / devcontainers/spec
Add `dockerComposeArgs` to allow passing `--env-file` to `dockerComposeFile`
- Dominant language
- No language data
- Stars
- 5.7k
- Forks
- 496
- PR merge metrics
- No merged PRs in 30d
Description
`docker compose up` accepts a `--env-file` to point to a .env file and set its contents as env vars, which are **available when parsing the docker-compose.yaml**. note that this is **different** from the `env_file` config option in `docker-compose.yaml`, which only sets env vars inside the container.
when providing `dockerComposeFile` in `devcontainer.json` there is currently no way to pass `--env file`.
suggestion (following https://github.com/microsoft/vscode-remote-release/issues/4885#issuecomment-2408558170):
```json
{
"dockerComposeFile": ["a.compose.yaml", "b.compose.yaml"],
"dockerComposeArgs": ["--env-file custom.env"]
}
```
Contributor guide
Assessment
This issue has not been assessed yet.