1
0
mirror of https://github.com/securego/gosec.git synced 2024-12-26 20:53:56 +02:00
gosec/Dockerfile
Giovanni Rosa 7df7baa3f0
Fix for Dockerfile smell DL3059 (#951)
Signed-off-by: Giovanni Rosa <g.rosa1@studenti.unimol.it>
2023-04-14 13:46:24 +02:00

16 lines
465 B
Docker

ARG GO_VERSION
FROM golang:${GO_VERSION}-alpine AS builder
RUN apk add --no-cache ca-certificates make git curl gcc libc-dev \
&& mkdir -p /build
WORKDIR /build
COPY . /build/
RUN go mod download \
&& make build-linux
FROM golang:${GO_VERSION}-alpine
RUN apk add --no-cache ca-certificates bash git gcc libc-dev openssh
ENV GO111MODULE on
COPY --from=builder /build/gosec /bin/gosec
COPY entrypoint.sh /bin/entrypoint.sh
ENTRYPOINT ["/bin/entrypoint.sh"]