How to set docker sudo in Nextflow for your containers

Hi! It took me a bit to figure out how to do this so leaving here for others that may experience the same issue:

This is the nextflow.config that makes it work:

docker {
    enabled = true
}

docker.sudo = true

wave.enabled = true
wave.freeze = true

What’s the reason to have sudo enabled in a docker container? Isn’t it better to run as the user (docker.runOptions = '-u $(id -u):$(id -g)') so files written out from the container are readable by the user outside the container?

1 Like