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