Fix build for Go1.16, update filebeat

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2021-03-07 14:02:32 +01:00
parent 74daa8feb9
commit 0edfc52522
Signed by: luzifer
GPG key ID: 0066F03ED215AD7D

View file

@ -1,14 +1,18 @@
FROM golang:alpine FROM golang:alpine
ENV FILEBEAT_VERSION=v6.1.1 ENV FILEBEAT_VERSION=v7.11.1
RUN set -ex \ RUN set -ex \
&& apk --no-cache add build-base git ca-certificates \ && apk --no-cache add \
build-base \
git \
ca-certificates \
&& mkdir -p /go/src/github.com/elastic \ && mkdir -p /go/src/github.com/elastic \
&& git clone https://github.com/elastic/beats.git /go/src/github.com/elastic/beats \ && git clone -b ${FILEBEAT_VERSION} \
&& git -C /go/src/github.com/elastic/beats fetch origin --tags \ https://github.com/elastic/beats.git \
&& git -C /go/src/github.com/elastic/beats reset --hard ${FILEBEAT_VERSION} \ /go/src/github.com/elastic/beats \
&& go install -v github.com/elastic/beats/filebeat && cd /go/src/github.com/elastic/beats/filebeat \
&& go install -mod=readonly
FROM alpine FROM alpine