DiamondLightSource / DiamondLightSource/python-copier-template

rootful is broken

Abierto
#217 0 comentarios 0 reacciones 0 asignados Ver en GitHub
devcontainer
Lenguaje dominante
Jinja
Estrellas
25
Forks
10
Merge medio
4 h 4 min
PR fusionados (30 d)
6

Descripción

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.

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
docker, python
Área
developer-experience, devops
Tipo de issue
Error
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Estancado
Claridad
Necesita aclaración
Aptitud para principiantes
30/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.