devcontainers / devcontainers/spec
Allow the use of workspaceFolder without specifying workspaceMount
- Dominant language
- No language data
- Stars
- 5.7k
- Forks
- 496
- PR merge metrics
- No merged PRs in 30d
Description
Today the `workspaceFolder` property requires `workspaceMount` to be in non-dockerCompose scenarios. Given processing for `devcontainer.json` should mount the location of the `.git` folder unless `workspaceMount` is set, it is reasonable to allow this property to be set independently.
In this scenario, the following syntax could be used to connect to a relative path to the detected auto-mount location.
```
"workspaceFolder": "${containerWorkspaceFolder}/some/sub/path"
```
To avoid confusion, if `workspaceMount` is specified, or this is a Docker Compose scenario, `${containerWorkspaceFolder}` would be treated like `""`. We could also introduce a different variable here instead (e.g. `defaultContainerWorkspaceFolder`) that had these same smarts in it.
Contributor guide
Assessment
This issue has not been assessed yet.