1
0
mirror of https://github.com/securego/gosec.git synced 2024-12-28 21:08:22 +02:00
gosec/Dockerfile
Cosmin Cojocar 7935fd85b9 Rework the Dockerfile for Go modules
Signed-off-by: Cosmin Cojocar <cosmin.cojocar@gmx.ch>
2019-04-27 08:20:40 +02:00

15 lines
394 B
Docker

ARG GO_VERSION=1.12
FROM golang:${GO_VERSION}-alpine AS builder
RUN apk add --update --no-cache ca-certificates make git curl
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
ENV GO111MODULE on
COPY --from=builder /build/gosec /bin/gosec
ENTRYPOINT ["/bin/gosec"]