FROM store/elastic/filebeat:7.15.2
USER root
RUN whoami
RUN rm -f /usr/share/filebeat/filebeat.yml
RUN rm -rf /usr/share/filebeat/modules.d
RUN rm -rf /usr/share/filebeat/kibana/7/dashboard/
COPY filebeat.yml filebeat.yml
RUN cat filebeat.yml
COPY modules.d modules.d
COPY kibana kibana
RUN chmod go-w /usr/share/filebeat/filebeat.yml
RUN chmod go-w -R /usr/share/filebeat/modules.d/
RUN chmod go-w -R /usr/share/filebeat/kibana/7/dashboard/