gosec-docker/Dockerfile
Markus Pesch 4c845b61fa
All checks were successful
continuous-integration/drone/push Build is passing
Initial Commit
2022-01-30 22:49:28 +01:00

15 lines
457 B
Docker

FROM docker.io/library/golang:1.17.5-alpine AS build
ARG GOSEC_VERSION
RUN apk update && \
apk upgrade && \
apk add git make
RUN if [ ! -z "${GOSEC_VERSION}" ]; then set -ex; go install github.com/securego/gosec/v2/cmd/gosec@${GOSEC_VERSION}; fi
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" ]