diff --git a/Dockerfile b/Dockerfile index f2e11cef6..2fbece717 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,8 +4,6 @@ ARG GOVERSION=1.19 FROM golang:${GOVERSION}-alpine AS build -RUN go install github.com/mikefarah/yq/v4@v4.30.6 - WORKDIR /go/src/crowdsec COPY . . @@ -19,7 +17,8 @@ RUN apk add --no-cache git gcc libc-dev make bash gettext binutils-gold coreutil cd - >/dev/null && \ cscli hub update && \ cscli collections install crowdsecurity/linux && \ - cscli parsers install crowdsecurity/whitelists + cscli parsers install crowdsecurity/whitelists && \ + go install github.com/mikefarah/yq/v4@v4.30.6 FROM alpine:latest as build-slim diff --git a/Dockerfile.debian b/Dockerfile.debian index 74da6c73d..ebae4d376 100644 --- a/Dockerfile.debian +++ b/Dockerfile.debian @@ -4,8 +4,6 @@ ARG GOVERSION=1.19 FROM golang:${GOVERSION}-bullseye AS build -RUN go install github.com/mikefarah/yq/v4@v4.30.6 - WORKDIR /go/src/crowdsec COPY . . @@ -23,7 +21,8 @@ RUN apt-get update && \ cd - >/dev/null && \ cscli hub update && \ cscli collections install crowdsecurity/linux && \ - cscli parsers install crowdsecurity/whitelists + cscli parsers install crowdsecurity/whitelists && \ + go install github.com/mikefarah/yq/v4@v4.30.6 FROM debian:bullseye-slim as build-slim