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