Feature: Document SELinux bind-mount note for local devcontainer usage
未關閉
適合新手
還沒有人認領這個 Issue。
type-feature
- 主要語言
- Python
- 星號
- 2.1k
- 分支
- 1k
- 平均合併
- 2 天 12 小時
- 30 天內合併 PR
- 12
描述
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:latest
In that case, a SELinux-compatible bind mount works:
docker run -it --rm \
-v "$PWD:/workspace:Z" \
-w /workspace \
ghcr.io/python/devcontainer:latest
Without 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:latest
Additional context
No response
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
在本地 Docker/devcontainer 文件中查找 issue 所示的 bind-mount 用法。為啟用 SELinux 的 Linux 主機新增一則簡短說明,使用 :Z 形式的 bind-mount,並在適當情況下提及停用標籤的替代做法。完成的標準是文件說明一般 mount 為何可能失敗,並展示一個可運作的命令。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- docker
- 領域
- devops, documentation
- Issue 類型
- 文件
- 難度
- 2/5
- 預估耗時
- 1-3 小時
- 活躍度
- 冷清
- 描述清晰度
- 基本清楚
- 新手友好度
- 68/100