DiamondLightSource / DiamondLightSource/python-copier-template

rootful is broken

未關閉
#217 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
devcontainer
主要語言
Jinja
星號
25
分支
10
平均合併
4 小時 4 分鐘
30 天內合併 PR
6

描述

If you use the python copier template developer container and you have docker (or rootful podman) then it does not work as intended:

- GOOD: it loads and you can work on the project and run tests
- BAD: massively insecure as you are running as true root
- UGLY: project files get written by root and the git gets really angry

There used to be a workaround to this in devcontainer.json
```json
"remoteUser": "${localEnv:VSCODE_REMOTE_USER}"
```

docker users were then expected to set VSCODE_REMOTE_USER=$(id -u):$(id -g) in their bashrc.
podman users need do nothing as blank == default == root which is just right in a a rootless container.

Not ideal. But it was the best I could come up with.

貢獻指南

開啟貢獻指南

研究方向

從 Python Copier 範本中的 devcontainer.json 設定開始,並使用 Docker 或 rootful Podman 重現該行為。將目前的容器使用者處理方式與先前的 VSCODE_REMOTE_USER workaround 進行比較;當容器無需以真正的 root 身分執行,且不會留下歸 root 所有的專案檔案,同時仍可使用時,即表示完成。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
docker, python
領域
developer-experience, devops
Issue 類型
缺陷
難度
3/5
預估耗時
1-2 天
活躍度
停滯
描述清晰度
需要釐清
新手友好度
30/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。