11 lines
288 B
Docker
11 lines
288 B
Docker
|
|
FROM golang:1.26-alpine AS builder
|
||
|
|
WORKDIR /src
|
||
|
|
COPY go.mod go.sum ./
|
||
|
|
RUN go mod download
|
||
|
|
COPY *.go ./
|
||
|
|
RUN CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o /dns-webhook .
|
||
|
|
|
||
|
|
FROM gcr.io/distroless/static:nonroot
|
||
|
|
COPY --from=builder /dns-webhook /dns-webhook
|
||
|
|
ENTRYPOINT ["/dns-webhook"]
|