Files
enkly-ai/services/gateway/Dockerfile
enkly 79ce8dc4c0
Some checks failed
Go CI Pipeline / build_and_test (push) Failing after 22m0s
Init Project
2026-10-30 18:06:55 +01:00

22 lines
742 B
Docker

# See services/iam/Dockerfile for the build-stage pattern. This image
# additionally ships web/templates and web/static, since the gateway is
# the only service that renders HTML.
FROM golang:1.23-bookworm AS build
WORKDIR /src
COPY go.mod go.sum* ./
COPY gen/ gen/
COPY pkg/ pkg/
COPY services/gateway/ services/gateway/
RUN go mod tidy
RUN CGO_ENABLED=0 go build -o /out/gateway-server ./services/gateway/cmd/server
FROM gcr.io/distroless/static-debian12:nonroot
WORKDIR /app
COPY --from=build /out/gateway-server ./gateway-server
COPY --from=build /src/services/gateway/web ./web
ENV ENKLY_GATEWAY_HTTP_ADDR=:8080
ENV ENKLY_TEMPLATES_DIR=/app/web/templates
ENV ENKLY_STATIC_DIR=/app/web/static
EXPOSE 8080
ENTRYPOINT ["./gateway-server"]