11 lines
288 B
Docker
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"]
|