DiamondLightSource / DiamondLightSource/python-copier-template

rootful is broken

Đang mở
#217 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
devcontainer
Ngôn ngữ chính
Jinja
Star
25
Fork
10
Merge trung bình
4 giờ 4 phút
Pull request đã merge (30 ngày)
6

Mô tả

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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Start with the devcontainer.json configuration in the Python Copier template and reproduce the behavior using Docker or rootful Podman. Compare the current container user handling with the former VSCODE_REMOTE_USER workaround; done should mean the container remains usable without running as true root or leaving project files owned by root.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
docker, python
Lĩnh vực
developer-experience, devops
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
30/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.