-
Notifications
You must be signed in to change notification settings - Fork 292
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
COMPOSE_PROJECT_NAME not used #5561
Comments
Compose changed from reading the |
I'm having this same issue. I've set up an example repository: https://github.com/davidrios/devcont-compose-project If I open folder If I put a It seems from the logs it forces a
If it didn't pass that argument, docker-compose would pick up the correct project name from the env file. |
@chrmarti, is there any update? Do you still have plans to change extension's (or devcontainer CLI) behaviour as described? For latest versions of Docker Compose (those that support Compose Specification) it can be even simpler - |
The reason we got into overwriting the project name is that the docker-compose.yml often is in the |
Looks like it was added in Docker Compose 2.3.0: ... which in turn added:
|
Is there a plan to support |
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.I can start compose with the below and the env vars, including
COMPOSE_PROJECT_NAME
, are respected and used.Even when starting the devcontainer referencing this composes file. The env vars are used as build args as mentioned initially.
But unfortunately, when using the container the resulting container are prefixed with
docker_
, unlike when using compose -f like shown above.The text was updated successfully, but these errors were encountered: