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