microsoft / microsoft/vscode-remote-release

Cannot launch Dev Container from folder, configured in dev.containers.repositoryConfigurationPaths

Open
#10,047 0 comments 1 reaction 1 assignee View on GitHub

@chrmarti is already working on this.

Since Jul 9, 2024.

bug containers
Dominant language
Dockerfile
Stars
4.2k
Forks
469
Avg merge
1d 1h
Merged PRs (30d)
1

Description

  • VSCode Version: 1.91.0
  • Dev Containers: v0.375.1
  • Local OS Version:
  • Remote OS Version:
  • Remote Extension/Connection Type: Containers/WSL

I'm trying to have my .devcontainer folder separate from repo.
I've created a folder d:/devcontainers, mirrored repo path, as folder structure.
I went to settings, and set

"dev.containers.repositoryConfigurationPaths": [
"D:\devcontainers"
]

I was able to open config, stored there using "Open container configuration file", and it opens correctly.

But when I try to open my project in this container, I get an error "Failed to read Dev Container configuration"

  • Logs:
[6215 ms] Start: Run in Host: /home/me/.vscode-remote-containers/bin/ea1445cc7016315d0f5728f8e8b12a45dc0a7286/node /home/me/.vscode-remote-containers/dist/dev-containers-cli-0.375.1/dist/spec-node/devContainersSpecCLI.js read-configuration --workspace-folder /mnt/d/vscode/<PROJECT_NAME> --log-level debug --log-format json --config d:/devcontainers/<REPO PATH>/.devcontainer/devcontainer.json --mount-workspace-git-root
[6413 ms] @devcontainers/cli 0.66.0. Node.js v20.11.1. linux 5.15.153.1-microsoft-standard-WSL2 x64.
[6413 ms] Error: Dev container config (/home/me/.vscode-remote-containers/dist/dev-containers-cli-0.375.1/d:/devcontainers/<REPO PATH>/.devcontainer/devcontainer.json) not found.
    at brA (/home/me/.vscode-remote-containers/dist/dev-containers-cli-0.375.1/dist/spec-node/devContainersSpecCLI.js:666:6948)

Steps to Reproduce:

  1. Follow steps from https://code.visualstudio.com/docs/devcontainers/create-dev-container#_alternative-repository-configuration-folders
  2. Try to "Open container configuration file" -> Success
  3. Try to "Reopen in container" -> fail with error above

I, personally, assume, that problem in trying to open /home/me/.vscode-remote-containers/dist/dev-containers-cli-0.375.1/d:/devcontainers/ which, of course cannot exists.
So, the --config parameter, or how it is handled is problematic

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.