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