-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
38 lines (20 loc) · 943 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
FROM --platform=$BUILDPLATFORM tonistiigi/xx:1.5.0@sha256:0c6a569797744e45955f39d4f7538ac344bfb7ebf0a54006a0a4297b153ccf0f AS xx
FROM --platform=$BUILDPLATFORM golang:1.23.3-alpine3.20@sha256:09742590377387b931261cbeb72ce56da1b0d750a27379f7385245b2b058b63a AS builder
COPY --from=xx / /
RUN apk add --update --no-cache ca-certificates make git curl clang lld
ARG TARGETPLATFORM
RUN xx-apk --update --no-cache add musl-dev gcc
RUN xx-go --wrap
WORKDIR /usr/local/src/secrets-webhook
ARG GOPROXY
ENV CGO_ENABLED=0
COPY go.* ./
RUN go mod download
COPY . .
RUN go build -o /usr/local/bin/secrets-webhook .
RUN xx-verify /usr/local/bin/secrets-webhook
FROM alpine:3.20.3@sha256:beefdbd8a1da6d2915566fde36db9db0b524eb737fc57cd1367effd16dc0d06d
RUN apk add --update --no-cache ca-certificates tzdata libcap
COPY --from=builder /usr/local/bin/secrets-webhook /usr/local/bin/secrets-webhook
USER 65534
ENTRYPOINT ["secrets-webhook"]