2024-02-06 23:08:33 +00:00
|
|
|
FROM docker.io/library/golang:1.21.7-alpine AS build
|
2022-01-30 20:39:29 +00:00
|
|
|
|
|
|
|
ARG GOSEC_VERSION
|
|
|
|
|
|
|
|
RUN apk update && \
|
|
|
|
apk upgrade && \
|
|
|
|
apk add git make
|
|
|
|
|
2023-10-15 12:38:46 +00:00
|
|
|
RUN if [ ! -z "${GOSEC_VERSION}" ]; then set -ex; go install github.com/securego/gosec/v2/cmd/gosec@${GOSEC_VERSION}; fi
|
2022-01-30 20:39:29 +00:00
|
|
|
RUN if [ -z "${GOSEC_VERSION}" ]; then set -ex; go install github.com/securego/gosec/v2/cmd/gosec@latest; fi
|
|
|
|
|
|
|
|
RUN cp /go/bin/gosec /usr/bin/gosec && \
|
|
|
|
rm -rf /go/*
|
|
|
|
|
|
|
|
ENTRYPOINT [ "/usr/bin/gosec" ]
|