vscode-remote-release
vscode-remote-release copied to clipboard
v0.365.0 (pre-release) changed default container name
- VSCode Version: 1.89.0
- Local OS Version: Debian 12
- Remote OS Version: Debain 12
- Remote Extension/Connection Type: Containers
- Logs:
Steps to Reproduce:
- Reopen repo1 in container
- Wait until remote opened.
- Run
docker ps, the output will be like thisdevcontainer-xxx-1,devcontainer-yyy-1 - Reopen repo2 in container
- Wait until remote opened.
If I changed to release version (v0.365.0), when I run docker ps, the container name will be like this:
repo1_devcontainer-xxx-1,repo1_devcontainer-yyy-1 for repo1
and
repo2_devcontainer-xxx-1,repo2_devcontainer-yyy-1 for repo2
And which is expected. If I changed to pre version, I will start no nore then 1 repo.
Does this issue occur when you try this locally?: Yes/No Does this issue occur when you try this locally and all extensions are disabled?: Yes/No
0.365.0-pre-release picks up the project name from the docker-compose.yml's name property. Docker Compose does the same and the latest Dev Containers version contains a fix to also honor that property. (Also see https://docs.docker.com/compose/project-name/.)
But I don't have name in compose.yml, then the container name will always be devcontainer.
We detect the case where the name would be devcontainer (derived from the folder name .devcontainer) and change it to the parent folder's name followed by _devcontainer. Does that not work for you?
Yes, it will do. Thanks.
@chrmarti, it seems v0.367.0 (pre-release) act the same. btw, when extends auto update, it will change to pre-release version.
Continuing in https://github.com/devcontainers/cli/issues/831. I missed our recent change broke our handling of the case when the .devcontainer folder makes the project name devcontainer.
Fixed in Dev Containers 0.368.0-pre-release. Could you give that a try and let us know if this indeed fixes it? Thanks!
v0.368.0-pre-release works fine, thanks!