From 0edfc525220dbe8f55807295decbcc22fa1eabf1 Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Sun, 7 Mar 2021 14:02:32 +0100 Subject: [PATCH] Fix build for Go1.16, update filebeat Signed-off-by: Knut Ahlers --- Dockerfile | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index a8f6328..b81180c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,14 +1,18 @@ FROM golang:alpine -ENV FILEBEAT_VERSION=v6.1.1 +ENV FILEBEAT_VERSION=v7.11.1 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 \ - && git clone https://github.com/elastic/beats.git /go/src/github.com/elastic/beats \ - && git -C /go/src/github.com/elastic/beats fetch origin --tags \ - && git -C /go/src/github.com/elastic/beats reset --hard ${FILEBEAT_VERSION} \ - && go install -v github.com/elastic/beats/filebeat + && 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 FROM alpine