2020-04-09 12:01:40 +01:00
|
|
|
ARG GO_VERSION
|
2019-04-25 11:48:22 +01:00
|
|
|
FROM golang:${GO_VERSION}-alpine AS builder
|
2023-04-14 12:46:24 +01:00
|
|
|
RUN apk add --no-cache ca-certificates make git curl gcc libc-dev \
|
|
|
|
&& mkdir -p /build
|
2019-04-25 11:48:22 +01:00
|
|
|
WORKDIR /build
|
|
|
|
COPY . /build/
|
2023-04-14 12:46:24 +01:00
|
|
|
RUN go mod download \
|
|
|
|
&& make build-linux
|
2017-08-03 18:50:58 +01:00
|
|
|
|
2019-04-25 11:48:22 +01:00
|
|
|
FROM golang:${GO_VERSION}-alpine
|
2022-05-31 14:06:52 +01:00
|
|
|
RUN apk add --no-cache ca-certificates bash git gcc libc-dev openssh
|
2019-04-25 11:48:22 +01:00
|
|
|
ENV GO111MODULE on
|
|
|
|
COPY --from=builder /build/gosec /bin/gosec
|
2020-07-06 10:06:56 +01:00
|
|
|
COPY entrypoint.sh /bin/entrypoint.sh
|
|
|
|
ENTRYPOINT ["/bin/entrypoint.sh"]
|