add a docker file and generate certs and more makefile notes

This commit is contained in:
2025-12-11 04:28:55 -05:00
parent 15d959a6c8
commit c2942cd7fc
6 changed files with 207 additions and 2 deletions

26
Dockerfile Normal file
View File

@@ -0,0 +1,26 @@
FROM golang:1.24-alpine AS builder
WORKDIR /workspace
# Copy go mod files
COPY go.mod go.mod
COPY go.sum go.sum
# Cache dependencies
RUN go mod download
# Copy source code
COPY main.go main.go
# Build
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o webhook main.go
# Use distroless as minimal runtime image
FROM gcr.io/distroless/static:nonroot
WORKDIR /
COPY --from=builder /workspace/webhook .
USER 65532:65532
ENTRYPOINT ["/webhook"]