-
Notifications
You must be signed in to change notification settings - Fork 433
Description
-
VSCode Version:
Version: 1.55.0 (Universal) Commit: c185983a683d14c396952dd432459097bc7f757f Date: 2021-03-30T16:01:05.981Z Electron: 11.3.0 Chrome: 87.0.4280.141 Node.js: 12.18.3 V8: 8.7.220.31-electron.0 OS: Darwin arm64 20.3.0 -
Local OS Version:
macOS Big Sur 11.2.3 (20D91) -
Remote OS Version:
Ubuntu 20.04 LTS -
Remote Extension/Connection Type:
Docker
Steps to Reproduce:
-
Create a
.envfile in the project root withexport COMPOSE_PROJECT_NAME='foo'inside. -
Choose
Remote-Containers: Rebuild and Reopen in Container -
Watch the log. It will include a line like this:
[1437 ms] Start: Run: docker-compose --project-name BASE_DIR_NAME -f /Users/me/path/to/BASE_DIR_NAME/docker-compose.yml -f /Users/me/path/to/BASE_DIR_NAME/.devcontainer/docker-compose.devcontainer.yml up -d --build
Does this issue occur when you try this locally?: N/A
Does this issue occur when you try this locally and all extensions are disabled?: N/A
NOTE: COMPOSE_PROJECT_NAME=foo inside the .env file DOES work. VS Code will then execute docker-compose --project-name foo ... But export FOO='BAR' has been supported by Docker Compose since version 1.26, and allows the .env file to include inline comments and be more compatible and portable (e.g. can be sourced by bash).