microsoft / microsoft/vscode-remote-release
Multiple Dev Containers not recognized when cloning repository
@chrmarti is already working on this.
Since May 2, 2023.
- Dominant language
- Dockerfile
- Stars
- 4.2k
- Forks
- 470
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 1
Description
I want to setup multiple dev containers for the same repository targeted towards different users. For example:
workspace
- .devcontainers
- profile1
- devcontainer.json
- profile2
- devcontainer.json
- ...
This works well when the workspace is already open in VS Code and the container is opened via Reopen in Container or Rebuild and Reopen in Container. The extension correctly detects both configurations and presents a choice between profile1 and profile2.

However, the same thing does not work when cloning a repostiory to be opened within a container, either via the command Clone Repository in Container Volume... or via a direct link such as https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=<repo>.
In this case the extension will only detect a container if it is directly nested under workspace/.devcontainers, and otherwise prompt the user to setup a new dev container:

- VSCode Version: 1.77.3
- Local OS Version: Windows 11
- Remote OS Version: Debian 11
- Remote Extension/Connection Type: Containers (v0.291.0)
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.