Search code examples
visual-studio-codevscode-remotefedora-silverblueremote-containers

Fedora Silverblue : VS code's remote container extension : empty folder


Introduction

I'm currently trying to use Remote container of VS Code with Fedora 36 Silverblue OS.
And I configured the extension to use Podman instead of Docker.
The project with which I try to use the extension: https://github.com/beurtschipper/Depix

Problem

When I try this, I obtain an empty project folder : Empty folder of Dev Container

Question

Does someone have the solution to solve this problem?


Solution

  • To fix this issue, you need to add the following to your devcontainer.json:

    "remoteUser": "vscode",
    "containerUser": "vscode"
    "workspaceMount": "source=${localWorkspaceFolder},target=/workspaces/${localWorkspaceFolderBasename},type=bind,Z",
    "runArgs": [
      "--userns=keep-id"
    ]
    

    After that, you can run "Rebuild Container" and it should work.

    Sources:
    workspaceMount
    runArgs