# Build stage FROM golang:1.24.2-alpine AS builder WORKDIR /app COPY go.mod go.sum . RUN go mod download COPY . . # Optionally we could also strip debug symbols with `-ldflags '-s'` RUN CGO_ENABLED=0 GOOS=linux go build -o /notatest . # Final stage (optimized image size) FROM alpine:latest WORKDIR /app COPY --from=builder /notatest /app/notatest EXPOSE 8080 CMD ["/app/notatest"]