DiamondLightSource / DiamondLightSource/python-copier-template

rootful is broken

Open
#217 0 comments 0 reactions 0 assignees View on GitHub
devcontainer
Dominant language
Jinja
Stars
25
Forks
10
Avg merge
4h 4m
Merged PRs (30d)
6

Description

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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.