Skip to content
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.yaml name breaks when using vars ${VAR} #839

Closed
lucasfcnunes opened this issue Jun 6, 2024 · 3 comments · Fixed by #841
Closed

compose.yaml name breaks when using vars ${VAR} #839

lucasfcnunes opened this issue Jun 6, 2024 · 3 comments · Fixed by #841
Assignees
Labels
bug Something isn't working
Milestone

Comments

@lucasfcnunes
Copy link

lucasfcnunes commented Jun 6, 2024

Description

Setup

# compose.yaml
name: ${COMPOSE_PROJECT_NAME}
services:
  # ...
# .env
COMPOSE_PROJECT_NAME=abc_123

Results

$ docker compose config
name: abc_123
services:
  # ...

Issue

Instead of doing the expansion as above, devcontainer now reads it as compose_project_name - not expanding the variable. (${COMPOSE_PROJECT_NAME} -> compose_project_name)

It breaks the names of the project, volumes, networks, etc - empty container

It happened first today on https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers @ v0.369.0.

The v0.362.0 uses the folder name. My var is always the same as the folder name that's why I only experienced it today.

Related

@lucasfcnunes
Copy link
Author

@chrmarti can you help me?

@chrmarti chrmarti self-assigned this Jun 7, 2024
@chrmarti chrmarti added the bug Something isn't working label Jun 7, 2024
@chrmarti chrmarti added this to the June 2024 milestone Jun 7, 2024
@chrmarti
Copy link
Contributor

chrmarti commented Jun 7, 2024

Preparing a fix. You can use the previous stable version of Dev Containers 0.362.0 until we get the fix out.

@chrmarti
Copy link
Contributor

This is fixed in Dev Containers 0.372.0-pre-release. Could you give that a try and let me know if it fixes the issue for you? Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants