gosec-docker/Dockerfile
CSRBot 44a6fda3a9
Some checks reported errors
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build was killed
chore(deps): update docker.io/library/golang docker tag to v1.22.4
2024-06-04 22:10:08 +00:00

15 lines
457 B
Docker

FROM docker.io/library/golang:1.22.4-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" ]