19 lines
417 B
Docker
19 lines
417 B
Docker
FROM golang:1.24-alpine AS builder
|
|
|
|
# Set working directory
|
|
WORKDIR /app
|
|
|
|
# Copy source code
|
|
COPY . .
|
|
|
|
# Build the Go binary statically
|
|
RUN CGO_ENABLED=0 GOOS=linux go build -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"]
|