# Logstash docker-compose non root user

**URL:** <https://discuss.elastic.co/t/logstash-docker-compose-non-root-user/336598>\
**Category:** Logstash\
**Tags:** docker\
**Created:** [June 21, 2023, 2:41pm UTC](https://discuss.elastic.co/t/logstash-docker-compose-non-root-user/336598 "2023-06-21T14:41:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![maehue](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/maehue/32/57036_2.png) [@maehue](https://discuss.elastic.co/u/maehue)\
**Post date:** [June 21, 2023, 2:41pm UTC](https://discuss.elastic.co/t/logstash-docker-compose-non-root-user/336598/1 "2023-06-21T14:41:07Z")

</div>

To date we have been running logstash 7.16.2 as a non-root user in docker using a docker-compose configuration similar to below:

```auto
version: 3.3
services:
   logstash:
      image: logstash:7.16.2
      user: 10002:1001
      volumes:
           config
           data
           logs

```

This worked fine for the past year but in attempting to upgrade to 8.8.1 - we are getting an error

```auto
(LoadError) failure to load file: java.io.FileNotFoundException: /usr/share/logstash/logstash-core/lib/logstash/build.rb

```

Is there any documentation or sample docker-compose for running the elastic published docker images as non-root user outside of creating the image from scratch as it is enterprise requirement.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 19, 2023, 2:41pm UTC](https://discuss.elastic.co/t/logstash-docker-compose-non-root-user/336598/2 "2023-07-19T14:41:22Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
