fn-go/Dockerfile
fnkit c979088e0b
Some checks failed
/ deploy (push) Failing after 50s
initial commit - go function
2026-02-17 16:45:12 +00:00

13 lines
306 B
Docker

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