# Run service in user root

**URL:** <https://discuss.hashicorp.com/t/run-service-in-user-root/46122>\
**Category:** Nomad\
**Created:** [October 27, 2022, 4:35pm UTC](https://discuss.hashicorp.com/t/run-service-in-user-root/46122 "2022-10-27T16:35:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![yaelkadosh](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/yaelkadosh/32/31636_2.png) [@yaelkadosh](https://discuss.hashicorp.com/u/yaelkadosh)\
**Post date:** [October 27, 2022, 4:35pm UTC](https://discuss.hashicorp.com/t/run-service-in-user-root/46122/1 "2022-10-27T16:35:09Z")

</div>

Hi ,  
I trying to run docker with user root

```auto
task "init_airflows" {
            driver = "docker"
            config {
                image = "apache/airflow:2.2.5"
                user = "root"
}
}

```

But I get an error

```auto
2022-10-27T15:50:54Z Failed Validation 2 errors occurred:
        * failed to parse config: 
        * Invalid label: No argument or block type is named "user".

```

---

<div class="post-metadata">

**Author:** ![runeron](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/runeron/32/19832_2.png) [@runeron](https://discuss.hashicorp.com/u/runeron)\
**Post date:** [October 28, 2022, 12:15pm UTC](https://discuss.hashicorp.com/t/run-service-in-user-root/46122/2 "2022-10-28T12:15:17Z")

</div>

> **[task Stanza - Job Specification | Nomad | HashiCorp Developer](https://developer.hashicorp.com/nomad/docs/job-specification/task#user)**
>
> The "task" stanza creates an individual unit of work, such as a Docker
> container, web application, or batch processing.

It is set on the same level as your config-block; not inside it.
