-
Notifications
You must be signed in to change notification settings - Fork 255
Open
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationimproveNew feature or requestNew feature or request
Description
Discussion from Slack thread: https://nfcore.slack.com/archives/C043FMKUNLB/p1743470447418089
When running docker containers, either within Nextflow or on the command-line, it would be good practice to run as the user, so outputs are not written out as root user.
docker run --rm -it -u $(id -u):$(id -g) <image>and
docker {
docker.enabled = true
docker.runOptions = '-u $(id -u):$(id -g)' // <- run as your user. Not root user.
}
A drop-down box marked as a note, or a callout would also be useful the first time the user runs docker in the lesson. This would explain that docker containers are by default run as the user they were built with (often root user), and therefore the outputs written by the software are also owned by that user. In order to run as the user running the container, one needs to supply the -u option with the argument above.
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationimproveNew feature or requestNew feature or request