Skip to content

Instantly share code, notes, and snippets.

@dariuszparys
Created September 2, 2021 20:41
Show Gist options
  • Save dariuszparys/05ad6b0bf070cda64724b668f35c897c to your computer and use it in GitHub Desktop.
Save dariuszparys/05ad6b0bf070cda64724b668f35c897c to your computer and use it in GitHub Desktop.
Running VSCode DevContainers with Podman

Running Visual Studio Code DevContainers with Podman

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

@TeaDrinkingProgrammer
Copy link

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 change containeruser to node. Otherwise, this is the first easy solution that actually works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment