Skip to content

Run as your user

Mount your working folder at /workspace and run as your own user, so files you create belong to you:

docker run --rm -u "$(id -u):$(id -g)" -v "$PWD:/workspace" IMAGE:TAG COMMAND

The images keep caches in /tmp, so they also run with --read-only --tmpfs /tmp:exec and with an arbitrary user id.