Open
Labels
type-featureAdditions; New content or section neededAdditions; New content or section needed
Description
Describe the enhancement or feature you would like
When using the CPython devcontainer image on SELinux-enabled Linux hosts, a plain bind mount may fail with Permission denied inside the container.
Example:
docker run -it --rm \
-v "$PWD:/workspace" \
-w /workspace \
ghcr.io/python/devcontainer:latestIn that case, a SELinux-compatible bind mount works:
docker run -it --rm \
-v "$PWD:/workspace:Z" \
-w /workspace \
ghcr.io/python/devcontainer:latestWithout relabeling, /workspace may not be readable from inside the container.
It may be helpful to add a short note to the local Docker/devcontainer documentation for SELinux-enabled hosts, preferably using the :Z bind-mount form.
Describe alternatives you have considered
As an alternative workaround, this also works:
docker run -it --rm \
--security-opt label=disable \
-v "$PWD:/workspace" \
-w /workspace \
ghcr.io/python/devcontainer:latestAdditional context
No response
Metadata
Metadata
Assignees
Labels
type-featureAdditions; New content or section neededAdditions; New content or section needed
Activity
pranavchoudhary-tech commentedon Aug 14, 2026
I'd be happy to handle this. I will submit a PR adding the SELinux bind-mount note to the devcontainer documentation.
Anusha27-08 commentedon Oct 9, 2026
Poojabala30 commentedon Oct 10, 2026
pavithraramesh5500-ship-cse commentedon Oct 19, 2026
docs: document SELinux bind-mount requirement for devcontainer (pytho…
pranavchoudhary-tech commentedon Oct 22, 2026