fn-go/Dockerfile
fnkit b74b331dd5
All checks were successful
/ deploy (push) Successful in 1m6s
fix: use go mod tidy in Dockerfile
2026-02-17 17:06:52 +00:00

11 lines
288 B
Docker

FROM golang:1.22 AS builder
LABEL fnkit.fn="true"
WORKDIR /app
COPY . .
RUN go mod tidy && CGO_ENABLED=0 GOOS=linux go build -o server ./cmd/main.go
FROM gcr.io/distroless/static-debian12
COPY --from=builder /app/server /server
ENV FUNCTION_TARGET=HelloWorld
EXPOSE 8080
CMD ["/server"]