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

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 but it didn't work.

Thanks for your help

What happens when you remove the entrypoint line?

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

@mtojek any idea ?

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