I basically have the same problem as this other topic, 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>