devcontainers / devcontainers/spec
why is "/vscode/.vscode-server" shared across all devcontainers instances instead of being duplicated ?
- Dominant language
- No language data
- Stars
- 5.7k
- Forks
- 496
- PR merge metrics
- No merged PRs in 30d
Description
devcontainers allow specifying the settings of supporting tools:
- https://containers.dev/implementors/json_reference/
- https://containers.dev/supporting
vscode being one of the supporting tools, I tried many times to use this feature but I found myself a bit disappointed when I realized that the settings seems to be shared across devcontainers.
By essence, my understanding is that each devcontainer is independent and that's what makes them so useful.
Inside the devcontainer, I tried looking at the settings file: `/vscode/.vscode-server/data/Machine/settings.json` and it appears that it is shared among all devcontainers I run, even when they are spawned from very different `.devcontainers.json` files and from folders that are not at all related with each others.
I also tried to look at the images that vscode is creating to see if they contain the `/vscode/vscode-server` folder... It is not present... so vscode is mounting it dynamically...
... `docker inspect` shows that they come from a volume named `vscode`.
This volume is therefore obviously shared among all dev containers...
... and this seems to me that it isn't something I'd want: a python devcontainer has obviously nothing to do with a java devcontainer or a go devcontainer...
My dev stack is as follows:
- docker-desktop for windows
- vscode (windows)
- wsl2
What am I misunderstanding ?
What can I do to **not** share this volume and get, instead, separate volumes in separate devcontainers ?
Thanx.
Contributor guide
Assessment
This issue has not been assessed yet.