microsoft / microsoft/vscode-remote-release
COMPOSE_PROJECT_NAME not used
@chrmarti is already working on this.
Since Sep 15, 2021.
- Dominant language
- Dockerfile
- Stars
- 4.2k
- Forks
- 470
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 1
Description
Hi, using the COMPOSE_PROJECT_NAME doesn't appear to be working correctly. I don't have the .env at the root of my workspace, but next to my docker-compose file in a subdirectory. Strange enough. Other env variables from this .env file are read and used by compose as build args. So I know it's not an issue with the placement in terms of compose. It seems to be that vscode differs here and needs to have it at the root of the project.
├── .devcontainer
│ ├── devcontainer.json
│ └── docker-compose.patch.yaml
├── .docker
│ ├── .env
│ ├── docker-compose.yaml
├── Dockerfile
I can start compose with the below and the env vars, including COMPOSE_PROJECT_NAME , are respected and used.
docker-compose -f .docker/docker-compose.yaml up
Even when starting the devcontainer referencing this composes file. The env vars are used as build args as mentioned initially.
"dockerComposeFile": [
"../.docker/docker-compose.yaml",
"./docker-compose.patch.yaml"
]
But unfortunately, when using the container the resulting container are prefixed with docker_, unlike when using compose -f like shown above.
$ code -v
1.60.0
e7d7e9a9348e6a8cc8c03f877d39cb72e5dfb1ff
x64
Contributor 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.
Assessment
This issue has not been assessed yet.