FROM zenika/alpine-maven:3-jdk8

ARG config_file
ENV APP_PARAMS "-cf config/$config_file"

ENV DEBUG "false"
ENV LOG_MONITOR "false"

COPY docker/filebeat.yml /etc/conf.d/
COPY docker/start.sh /app/

COPY bin/ /app/bin
COPY config/$config_file /app/config/$config_file

WORKDIR /app

RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories
RUN apk update
RUN apk add filebeat

ENTRYPOINT ["/bin/sh", "-C", "start.sh"]
