# RE: /usr/local/bin/docker-entrypoint: line 8: exec: filebeat: not found

**URL:** https://discuss.elastic.co/t/re-usr-local-bin-docker-entrypoint-line-8-exec-filebeat-not-found/177648
**Category:** Beats
**Tags:** docker, filebeat
**Created:** [April 19, 2019, 4:37pm UTC](https://discuss.elastic.co/t/re-usr-local-bin-docker-entrypoint-line-8-exec-filebeat-not-found/177648 "2019-04-19T16:37:09Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Michele\_Chersich](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/michele_chersich/32/44470_2.png) [@Michele\_Chersich](https://discuss.elastic.co/u/Michele_Chersich)
#### Post date: [April 19, 2019, 4:37pm UTC](https://discuss.elastic.co/t/re-usr-local-bin-docker-entrypoint-line-8-exec-filebeat-not-found/177648/1 "2019-04-19T16:37:09Z")

</div>

I basically have the same problem as [this other topic](https://discuss.elastic.co/t/usr-local-bin-docker-entrypoint-line-8-exec-filebeat-not-found/149935), but I am reposting it since no solution was found.

Deploying filebeats via docker-compose produces the following error:

`/usr/local/bin/docker-entrypoint: line 8: exec: filebeat: not found /usr/local/bin/docker-entrypoint: line 8: exec: filebeat: not found /usr/local/bin/docker-entrypoint: line 8: exec: filebeat: not found /usr/local/bin/docker-entrypoint: line 8: exec: filebeat: not found /usr/local/bin/docker-entrypoint: line 8: exec: filebeat: not found /usr/local/bin/docker-entrypoint: line 8: exec: filebeat: not found /usr/local/bin/docker-entrypoint: line 8: exec: filebeat: not found`

I am using a custom image, here's the content of my Dockerfile:

```
FROM docker.elastic.co/beats/filebeat:7.0.0
COPY filebeat.docker.yml /usr/share/filebeat/filebeat.yml
USER root
RUN chown -R root:root /usr/share/filebeat
RUN chmod go-w /usr/share/filebeat/filebeat.yml
RUN chmod a+rx /usr/share/filebeat/filebeat

```

and my docker-compose.yml:

```
version: '2.1'

services:

  filebeat:
    image: <filebeat image built from Dockerfile>
    labels:
      - co.elastic.logs/disable=true
    networks:
      net:
        ipv4_address: 192.168.0.16
    restart: always
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
      - /var/lib/docker/containers:/usr/share/filebeat/dockerlogs:ro

  logstash:
    image: <custom logstash image>
    labels:
      - co.elastic.logs/disable=true
    networks:
      net:
        ipv4_address: 192.168.0.17
    restart: always

networks:
  net:
    driver: bridge
    enable_ipv6: false
    ipam:
      driver: default
      config:
        - subnet: 192.168.0.0/24
          gateway: 192.168.0.254

```

All images are fetched from a private registry.

N.B.: running the same image with `docker run` works fine:

`docker run -v /var/run/docker.sock:/var/run/docker.sock:ro -v /var/lib/docker/containers:/usr/share/filebeat/dockerlogs:ro <custom filebeat image>`

---

<div class="post-metadata">

### Author: ![Debashis](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/debashis/32/45290_2.png) [@Debashis](https://discuss.elastic.co/u/Debashis)
#### Post date: [April 22, 2019, 8:44am UTC](https://discuss.elastic.co/t/re-usr-local-bin-docker-entrypoint-line-8-exec-filebeat-not-found/177648/2 "2019-04-22T08:44:08Z")

</div>

Hello @Michele_Chersich,

Kindly provide your complete docker-compose.yml with \</\>

---

<div class="post-metadata">

### Author: ![Michele\_Chersich](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/michele_chersich/32/44470_2.png) [@Michele\_Chersich](https://discuss.elastic.co/u/Michele_Chersich)
#### Post date: [April 22, 2019, 10:22am UTC](https://discuss.elastic.co/t/re-usr-local-bin-docker-entrypoint-line-8-exec-filebeat-not-found/177648/3 "2019-04-22T10:22:23Z")

</div>

The entire compose file does not fit in the description. I included one container and the network.

---

<div class="post-metadata">

### Author: ![Michele\_Chersich](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/michele_chersich/32/44470_2.png) [@Michele\_Chersich](https://discuss.elastic.co/u/Michele_Chersich)
#### Post date: [April 26, 2019, 5:14pm UTC](https://discuss.elastic.co/t/re-usr-local-bin-docker-entrypoint-line-8-exec-filebeat-not-found/177648/4 "2019-04-26T17:14:01Z")

</div>

For some reason filebeat's home directory is not in PATH.  
Overriding the default entrypoint solves the issue:

`entrypoint: bash -c 'export PATH=$PATH:/usr/share/filebeat && /usr/local/bin/docker-entrypoint -e'`

---

<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: [May 24, 2019, 5:14pm UTC](https://discuss.elastic.co/t/re-usr-local-bin-docker-entrypoint-line-8-exec-filebeat-not-found/177648/5 "2019-05-24T17:14:01Z")

</div>

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