Modify the corresponding .devcontainer.json to include this settings. If the container
already has runArgs
merge this setting with the existent.
"workspaceMount": "source=${localWorkspaceFolder},target=/workspace,type=bind,Z",
"workspaceFolder": "/workspace",
"runArgs": ["--userns=keep-id"],
"containerUser": "vscode"
Original post found here
https://opensource.com/article/21/7/vs-code-remote-containers-podman
This works if the user is actually vscode. Some images have a different user: the nodejs image uses
node
as the user. So if this is the case, you need to changecontaineruser
tonode
. Otherwise, this is the first easy solution that actually works.