2020-04-09 12:01:40 +01:00
|
|
|
ARG GO_VERSION
|
2019-04-25 11:48:22 +01:00
|
|
|
FROM golang:${GO_VERSION}-alpine AS builder
|
2019-12-17 01:36:33 +00:00
|
|
|
RUN apk add --update --no-cache ca-certificates make git curl gcc libc-dev
|
2019-04-25 11:48:22 +01:00
|
|
|
RUN mkdir -p /build
|
|
|
|
WORKDIR /build
|
|
|
|
COPY . /build/
|
|
|
|
RUN go mod download
|
|
|
|
RUN make build-linux
|
2017-08-03 18:50:58 +01:00
|
|
|
|
2019-04-25 11:48:22 +01:00
|
|
|
FROM golang:${GO_VERSION}-alpine
|
2019-12-17 01:36:33 +00:00
|
|
|
RUN apk add --update --no-cache ca-certificates git gcc libc-dev
|
2019-04-25 11:48:22 +01:00
|
|
|
ENV GO111MODULE on
|
|
|
|
COPY --from=builder /build/gosec /bin/gosec
|
|
|
|
ENTRYPOINT ["/bin/gosec"]
|