Files
WeeWooWebhook/build/Dockerfile
Henri Burau 5f4f162c1e
All checks were successful
Deploy and Push Docker Image / BuildAndPush (push) Successful in 51s
Update golang Docker tag to v1.25
2025-09-27 17:07:37 +02:00

24 lines
537 B
Docker

ARG BUILDPLATFORM
FROM --platform=$BUILDPLATFORM golang:1.25-alpine AS builder
# Set working directory
WORKDIR /app
# Copy source code
COPY . .
# Build statically for Linux
ARG TARGETOS
ARG TARGETARCH
RUN CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH \
go build -a -installsuffix cgo -o weewoowebhook /app/cmd/wee_woo_webhook/main.go
FROM scratch
# Copy statically built binary from the builder
COPY --from=builder /app/weewoowebhook /weewoowebhook
# Set the binary as the container entrypoint
ENTRYPOINT ["/weewoowebhook"]