Skip to content

Add dockerComposeArgs to allow passing --env-file to dockerComposeFile #726

@stefanprobst

Description

@stefanprobst

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 microsoft/vscode-remote-release#4885 (comment)):

{
  "dockerComposeFile": ["a.compose.yaml", "b.compose.yaml"],
  "dockerComposeArgs": ["--env-file custom.env"]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions