-
Notifications
You must be signed in to change notification settings - Fork 35
Expand file tree
/
Copy pathDockerfile
More file actions
38 lines (20 loc) · 977 Bytes
/
Dockerfile
File metadata and controls
38 lines (20 loc) · 977 Bytes
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.9.0@sha256:c64defb9ed5a91eacb37f96ccc3d4cd72521c4bd18d5442905b95e2226b0e707 AS xx
FROM --platform=$BUILDPLATFORM golang:1.26-alpine3.22@sha256:7ef941168f213aa115df2e61364d67682129e99dc8188b734139dea862cc7d31 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/vault-secrets-webhook
ARG GOPROXY
ENV CGO_ENABLED=0
COPY go.* ./
RUN go mod download
COPY . .
RUN go build -o /usr/local/bin/vault-secrets-webhook .
RUN xx-verify /usr/local/bin/vault-secrets-webhook
FROM alpine:3.23.4@sha256:5b10f432ef3da1b8d4c7eb6c487f2f5a8f096bc91145e68878dd4a5019afde11
RUN apk add --update --no-cache ca-certificates tzdata libcap
COPY --from=builder /usr/local/bin/vault-secrets-webhook /usr/local/bin/vault-secrets-webhook
USER 65534
ENTRYPOINT ["vault-secrets-webhook"]