From 8d0af73a4fb24ef8416e598d891c6e5e5501ede5 Mon Sep 17 00:00:00 2001 From: mmetc <92726601+mmetc@users.noreply.github.com> Date: Tue, 3 Jan 2023 16:49:25 +0100 Subject: [PATCH] docker: install gcc before yq (fix i386 build) (#1965) --- Dockerfile | 5 ++--- Dockerfile.debian | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) 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