2018-01-13 17:08:48 +00:00
|
|
|
FROM golang:alpine
|
|
|
|
|
2021-03-07 13:02:32 +00:00
|
|
|
ENV FILEBEAT_VERSION=v7.11.1
|
2018-01-13 17:08:48 +00:00
|
|
|
|
|
|
|
RUN set -ex \
|
2021-03-07 13:02:32 +00:00
|
|
|
&& apk --no-cache add \
|
|
|
|
build-base \
|
|
|
|
git \
|
|
|
|
ca-certificates \
|
2018-01-13 17:08:48 +00:00
|
|
|
&& mkdir -p /go/src/github.com/elastic \
|
2021-03-07 13:02:32 +00:00
|
|
|
&& git clone -b ${FILEBEAT_VERSION} \
|
|
|
|
https://github.com/elastic/beats.git \
|
|
|
|
/go/src/github.com/elastic/beats \
|
|
|
|
&& cd /go/src/github.com/elastic/beats/filebeat \
|
|
|
|
&& go install -mod=readonly
|
2018-01-13 17:08:48 +00:00
|
|
|
|
|
|
|
|
|
|
|
FROM alpine
|
|
|
|
|
|
|
|
LABEL maintainer Knut Ahlers <knut@ahlers.me>
|
|
|
|
|
|
|
|
RUN set -ex \
|
|
|
|
&& apk --no-cache add ca-certificates
|
|
|
|
|
|
|
|
COPY --from=0 /go/bin/filebeat /opt/filebeat/filebeat
|
|
|
|
|
|
|
|
ADD fields.yml /opt/filebeat/
|
|
|
|
ADD filebeat.yml /opt/filebeat/
|
|
|
|
ADD start.sh /opt/filebeat/
|
|
|
|
|
|
|
|
WORKDIR /opt/filebeat
|
|
|
|
|
|
|
|
VOLUME ["/var/log/vault", "/config"]
|
|
|
|
|
|
|
|
ENTRYPOINT ["sh", "/opt/filebeat/start.sh"]
|
|
|
|
CMD ["--"]
|