# Error when running Filebeat in docker: /usr/local/bin/docker-entrypoint: line 8: exec: filebeat: not found

**URL:** https://discuss.elastic.co/t/error-when-running-filebeat-in-docker-usr-local-bin-docker-entrypoint-line-8-exec-filebeat-not-found/233645
**Category:** Beats
**Tags:** filebeat
**Created:** [May 21, 2020, 1:53am UTC](https://discuss.elastic.co/t/error-when-running-filebeat-in-docker-usr-local-bin-docker-entrypoint-line-8-exec-filebeat-not-found/233645 "2020-05-21T01:53:36Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![david4](https://avatars.discourse-cdn.com/v4/letter/d/8e7dd6/32.png) [@david4](https://discuss.elastic.co/u/david4)
#### Post date: [May 21, 2020, 1:53am UTC](https://discuss.elastic.co/t/error-when-running-filebeat-in-docker-usr-local-bin-docker-entrypoint-line-8-exec-filebeat-not-found/233645/1 "2020-05-21T01:53:36Z")

</div>

I kept getting this error `/usr/local/bin/docker-entrypoint: line 8: exec: filebeat: not found` when running `export HOST_UID=1001; export HOST_GID=1001; docker-compose up`  
Here is my `docker-compose.yml` file:

```
version: '3.2'
services:
  filebeat:
    image: docker.elastic.co/beats/filebeat:7.1.1
    container_name: filebeat
    user: ${HOST_UID}:${HOST_GID}
    entrypoint: bash -c 'export PATH=$PATH:/usr/share/filebeat && /usr/local/bin/docker-entrypoint -e'
    volumes:
      - /jobs:/jobs
      - /home/filebeat.yml:/usr/share/filebeat/filebeat.yml
      - /home/configs/:/usr/share/filebeat/configs/
      - /home/data:/usr/share/filebeat/data

```

I already tried the approach in this link [RE: /usr/local/bin/docker-entrypoint: line 8: exec: filebeat: not found](https://discuss.elastic.co/t/re-usr-local-bin-docker-entrypoint-line-8-exec-filebeat-not-found/177648/2) but it didn't work.

Thanks for your help

---

<div class="post-metadata">

### Author: ![mtojek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mtojek/32/63863_2.png) [@mtojek](https://discuss.elastic.co/u/mtojek)
#### Post date: [May 21, 2020, 7:34am UTC](https://discuss.elastic.co/t/error-when-running-filebeat-in-docker-usr-local-bin-docker-entrypoint-line-8-exec-filebeat-not-found/233645/2 "2020-05-21T07:34:31Z")

</div>

What happens when you remove the entrypoint line?

---

<div class="post-metadata">

### Author: ![david4](https://avatars.discourse-cdn.com/v4/letter/d/8e7dd6/32.png) [@david4](https://discuss.elastic.co/u/david4)
#### Post date: [May 21, 2020, 6:35pm UTC](https://discuss.elastic.co/t/error-when-running-filebeat-in-docker-usr-local-bin-docker-entrypoint-line-8-exec-filebeat-not-found/233645/3 "2020-05-21T18:35:24Z")

</div>

Thanks for your reply ! I got the same error `/usr/local/bin/docker-entrypoint: line 8: exec: filebeat: not found`

---

<div class="post-metadata">

### Author: ![david4](https://avatars.discourse-cdn.com/v4/letter/d/8e7dd6/32.png) [@david4](https://discuss.elastic.co/u/david4)
#### Post date: [May 22, 2020, 11:34pm UTC](https://discuss.elastic.co/t/error-when-running-filebeat-in-docker-usr-local-bin-docker-entrypoint-line-8-exec-filebeat-not-found/233645/4 "2020-05-22T23:34:33Z")

</div>

@mtojek any idea ?

---

<div class="post-metadata">

### Author: ![mtojek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mtojek/32/63863_2.png) [@mtojek](https://discuss.elastic.co/u/mtojek)
#### Post date: [May 25, 2020, 12:55pm UTC](https://discuss.elastic.co/t/error-when-running-filebeat-in-docker-usr-local-bin-docker-entrypoint-line-8-exec-filebeat-not-found/233645/5 "2020-05-25T12:55:30Z")

</div>

Did you try without these exports: `export HOST_UID=1001; export HOST_GID=1001` ?

---

<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 22, 2020, 12:55pm UTC](https://discuss.elastic.co/t/error-when-running-filebeat-in-docker-usr-local-bin-docker-entrypoint-line-8-exec-filebeat-not-found/233645/6 "2020-06-22T12:55:32Z")

</div>

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