loft-sh / devpod

Codespaces but open-source, client-only and unopinionated: Works with any IDE and lets you use any cloud, kubernetes or just localhost docker.
https://devpod.sh
Mozilla Public License 2.0
8.73k stars 328 forks source link

Support devcontainers on Linux hosts using SELinux #1283

Open haakobja opened 3 days ago

haakobja commented 3 days ago

What happened?
Unable to access mounted workspace directory due to SELinux permissions

What did you expect to happen instead?
Use workspace directory as expected

How can we reproduce the bug?

My devcontainer.json: none (cloned a fresh git repo)

Local Environment:

DevPod Provider:

Anything else we need to know?
I use Podman and its Docker compatibility mode.

There are three workarounds for this:

  1. Set SELinux as permissive (I've not tried this)
  2. Append :Z in .devcontainer.json as described in https://github.com/loft-sh/devpod/issues/970#issuecomment-2297652537, but this is not viable if the devcontainer is used by others
  3. When using Podman: Add label=false to [container] in $HOME/.config/containers/containers.conf

I think :Z or :z (private or shared SELinux context) or label=false should be set by DevPod.

westurner commented 2 days ago