microsoft / microsoft/vscode-remote-release

Multiple Dev Containers not recognized when cloning repository

Open
#8,412 9 comments 14 reactions 1 assignee View on GitHub

@chrmarti is already working on this.

Since May 2, 2023.

containers feature-request
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.

A

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:

B

  • 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.