docker: install gcc before yq (fix i386 build) (#1965)

This commit is contained in:
mmetc 2023-01-03 16:49:25 +01:00 committed by GitHub
parent ff6ade73ce
commit 8d0af73a4f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 6 deletions

View file

@ -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

View file

@ -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