fix(docker) gcc and libc-dev required bindings

The docker image doesn't include the necessary packages to build / analyze
some packages. Adding gcc and libc-dev to addess this.
This commit is contained in:
Grant Murphy 2019-12-17 11:36:33 +10:00 committed by Grant Murphy
parent cb4f343eaf
commit 5d613739e1

View file

@ -1,6 +1,6 @@
ARG GO_VERSION=1.13 ARG GO_VERSION=1.13
FROM golang:${GO_VERSION}-alpine AS builder FROM golang:${GO_VERSION}-alpine AS builder
RUN apk add --update --no-cache ca-certificates make git curl RUN apk add --update --no-cache ca-certificates make git curl gcc libc-dev
RUN mkdir -p /build RUN mkdir -p /build
WORKDIR /build WORKDIR /build
COPY . /build/ COPY . /build/
@ -8,7 +8,7 @@ RUN go mod download
RUN make build-linux RUN make build-linux
FROM golang:${GO_VERSION}-alpine FROM golang:${GO_VERSION}-alpine
RUN apk add --update --no-cache ca-certificates git RUN apk add --update --no-cache ca-certificates git gcc libc-dev
ENV GO111MODULE on ENV GO111MODULE on
COPY --from=builder /build/gosec /bin/gosec COPY --from=builder /build/gosec /bin/gosec
ENTRYPOINT ["/bin/gosec"] ENTRYPOINT ["/bin/gosec"]