rootful is broken

Open
#217 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
30/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
docker, python

Research direction

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.

Written by the indexing model from the issue text.

Description

devcontainer

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

"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.

Dominant language
Jinja
Stars
28
Forks
10
Avg merge
3d 4h
Merged PRs (30d)
4

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from DiamondLightSource/python-copier-template

All issues in DiamondLightSource/python-copier-template

Similar issues

More DevTools issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.