We are trying to create a custom Dockerfile which will include FileBeat as well. When the container is started FileBeat should start automatically.
DockerFile
FROM microsoft/aspnetcore:2.0.3
WORKDIR /usr/local/filebeat
RUN curl -L -O https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-6.2.4-amd64.deb
RUN dpkg -i filebeat-6.2.4-amd64.deb
WORKDIR /usr/local/app
ADD docker-entrypoint.sh /usr/local/app/
RUN ["chmod", "+x", "/usr/local/app/docker-entrypoint.sh"]
ENTRYPOINT ["/usr/local/app/docker-entrypoint.sh"]
docker-entrypoint.sh
#!/bin/bash
service filebeat start
The FileBeat service doesn't start. Not sure what are we missing here.
I checked the official Docker Image for FileBeat where the FileBeat service starts automatically when the container is started.