Dev Containers: Change default workspace folder name

439 views Asked by At

When using the Dev Containers:New Dev Container option the default workspace folder that is created is named after the dev container type. For example if you choose the Node.js & Typescript type, the default folder for you code will be /workspaces/typescript-node. If I try to rename this folder, then I get an error next time I startup VS Code because it cannot find the .devcontainer folder, obviously because it's been moved to the new folder. Looking at the terminal output, it appears that this is the line that specifies the location of the .devcontainer folder during container startup

Start: Run in container: node /root/.vscode-remote-containers/dist/dev-containers-cli-0.315.1/dist/spec-node/devContainersSpecCLI.js read-configuration --workspace-folder /workspaces/typescript-node --id-label vsc.devcontainer.volume.name=typescript-node --id-label vsc.devcontainer.volume.folder=typescript-node --log-level debug --log-format json --mount-workspace-git-root

Specifically, the --workspace-folder /workspaces/typescript-node option.

Is it possible to rename the default code folder following a Dev Containers:New Dev Container and still preserve the ability to have vscode automatically spin up the container?

0

There are 0 answers