# Logstash 5.4 docker image can't find configuration files

**URL:** <https://discuss.elastic.co/t/logstash-5-4-docker-image-cant-find-configuration-files/85630>\
**Category:** Logstash\
**Created:** [May 13, 2017, 1:46am UTC](https://discuss.elastic.co/t/logstash-5-4-docker-image-cant-find-configuration-files/85630 "2017-05-13T01:46:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![endersonmaia](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/endersonmaia/32/17308_2.png) [@endersonmaia](https://discuss.elastic.co/u/endersonmaia)\
**Post date:** [May 13, 2017, 1:46am UTC](https://discuss.elastic.co/t/logstash-5-4-docker-image-cant-find-configuration-files/85630/1 "2017-05-13T01:46:05Z")

</div>

I was using [docker.elastic.io/logstash:5.3.0](http://docker.elastic.io/logstash:5.3.0) and everything was working fine, I just changed from 5.3.0 to 5.4.0 for the Dockerfile, and now when start it can't find the configuraiton file ?

Did anything change in this update, I couldn't find any reference to this chaging bevavior.

Just for reference, this are the lines I map via `--volume` to get logstash configs.

```
volumes:
  - ./logstash/config/logstash.yml:/usr/share/logstash/config/logstash.yml
  - ./logstash/pipeline/:/usr/share/logstash/pipeline/

```

The error I get with 5.4.0 is 🙂

```
logstash_1 | Sending Logstash's logs to /usr/share/logstash/logs which is now configured via log4j2.properties
logstash_1 | ERROR: No configuration file was specified. Perhaps you forgot to provide the -f yourlogstash.conf' flag?
logstash_1 | usage:
logstash_1 | bin/logstash -f CONFIG_PATH [-t] [-r] [] [-w COUNT] [-l LOG]
logstash_1 | bin/logstash -e CONFIG_STR [-t] [--log.level fatal|error|warn|info|debug|trace] [-w COUNT] [-l LOG]
logstash_1 | bin/logstash -i SHELL [--log.level fatal|error|warn|info|debug|trace]
logstash_1 | bin/logstash -V [--log.level fatal|error|warn|info|debug|trace]
logstash_1 | bin/logstash --help
logstashpoc_1 exited with code 1

```

If I add this to the docker-compose.yml, I works, but I'd like it to work as before.

```
command: ["-f", "/usr/share/logstash/pipeline/database-polling.conf"]
```

---

<div class="post-metadata">

**Author:** ![endersonmaia](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/endersonmaia/32/17308_2.png) [@endersonmaia](https://discuss.elastic.co/u/endersonmaia)\
**Post date:** [May 15, 2017, 1:00pm UTC](https://discuss.elastic.co/t/logstash-5-4-docker-image-cant-find-configuration-files/85630/2 "2017-05-15T13:00:46Z")

</div>

I solved this defining the environment variable `PATH_CONFIG=/usr/share/logstash/pipeline/*.conf` and then mapping the volume with my cofiguration `--volume ./logstash/pipeline/:/usr/share/logstash/pipeline/`

---

<div class="post-metadata">

**Author:** ![Damien\_Bell](https://avatars.discourse-cdn.com/v4/letter/d/9de0a6/32.png) [@Damien\_Bell](https://discuss.elastic.co/u/Damien_Bell)\
**Post date:** [May 23, 2017, 3:41pm UTC](https://discuss.elastic.co/t/logstash-5-4-docker-image-cant-find-configuration-files/85630/3 "2017-05-23T15:41:00Z")

</div>

Can you explain a bit more about how this variable worked for you? I'm guessing you just mean to run export PATH\_\_CONFIG=...

But why would that impact what's going on inside of a docker container if you were running it on the host? Also -- Why does this work fine on one of my systems but not my prod system (I've never run the PATH\_CONFIG) on either.

Any insight into why this works would be great.

---

<div class="post-metadata">

**Author:** ![endersonmaia](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/endersonmaia/32/17308_2.png) [@endersonmaia](https://discuss.elastic.co/u/endersonmaia)\
**Post date:** [May 23, 2017, 7:27pm UTC](https://discuss.elastic.co/t/logstash-5-4-docker-image-cant-find-configuration-files/85630/4 "2017-05-23T19:27:00Z")

</div>

@Damien_Bell sure.

```
docker container run \
-e PATH_CONFIG=/usr/share/logstash/pipeline \
-v $PWD/logstash.yml:/usr/share/logstash/config/logstash.yml
-v $PWD/pipeline/:/usr/share/logstash/pipeline/
docker.elastic.io/logstash:5.4.0

```

You can define `path.config` inside `./logstash.yml` if you wish, I'm using everything inside `ENV` variables, and don't even need to map `./logstash.yml`.

Just take a look at [https://www.elastic.co/guide/en/logstash/current/\_pulling\_the\_image.html#\_environment\_variable\_configuration](https://www.elastic.co/guide/en/logstash/current/_pulling_the_image.html#_environment_variable_configuration)

---

<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:** [June 20, 2017, 7:27pm UTC](https://discuss.elastic.co/t/logstash-5-4-docker-image-cant-find-configuration-files/85630/5 "2017-06-20T19:27:10Z")

</div>

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