# How to set docker sudo in Nextflow for your containers

**URL:** <https://community.seqera.io/t/how-to-set-docker-sudo-in-nextflow-for-your-containers/1278>\
**Category:** Tips & Tricks\
**Tags:** nextflow, wave\
**Created:** [October 10, 2024, 6:57pm UTC](https://community.seqera.io/t/how-to-set-docker-sudo-in-nextflow-for-your-containers/1278 "2024-10-10T18:57:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sasha\_Dagayev](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/sasha_dagayev/32/918_2.png) [@Sasha\_Dagayev](https://community.seqera.io/u/Sasha_Dagayev)\
**Post date:** [October 10, 2024, 6:57pm UTC](https://community.seqera.io/t/how-to-set-docker-sudo-in-nextflow-for-your-containers/1278/1 "2024-10-10T18:57:26Z")

</div>

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:

```auto
docker {
    enabled = true
}

docker.sudo = true

wave.enabled = true
wave.freeze = true
```

---

<div class="post-metadata">

**Author:** ![mahesh.binzerpanchal](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/mahesh.binzerpanchal/32/253_2.png) [@mahesh.binzerpanchal](https://community.seqera.io/u/mahesh.binzerpanchal)\
**Post date:** [October 11, 2024, 7:29am UTC](https://community.seqera.io/t/how-to-set-docker-sudo-in-nextflow-for-your-containers/1278/2 "2024-10-11T07:29:17Z")

</div>

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?
