mirror of
https://github.com/securego/gosec.git
synced 2024-11-05 19:45:51 +00:00
5d613739e1
The docker image doesn't include the necessary packages to build / analyze some packages. Adding gcc and libc-dev to addess this.
14 lines
419 B
Docker
14 lines
419 B
Docker
ARG GO_VERSION=1.13
|
|
FROM golang:${GO_VERSION}-alpine AS builder
|
|
RUN apk add --update --no-cache ca-certificates make git curl gcc libc-dev
|
|
RUN mkdir -p /build
|
|
WORKDIR /build
|
|
COPY . /build/
|
|
RUN go mod download
|
|
RUN make build-linux
|
|
|
|
FROM golang:${GO_VERSION}-alpine
|
|
RUN apk add --update --no-cache ca-certificates git gcc libc-dev
|
|
ENV GO111MODULE on
|
|
COPY --from=builder /build/gosec /bin/gosec
|
|
ENTRYPOINT ["/bin/gosec"]
|