Files
gpu-turnstile/Dockerfile
T
mram 75f16a0229
ci / test (push) Successful in 13s
ci / docker (push) Successful in 1m7s
ci / release (push) Successful in 14s
Copy go.sum into the Docker build; pin compose example to v0.1.5
The image build broke with the first Linux-imported dependency
(go-systemd): the Dockerfile copied go.mod only, and the missing go.sum
never mattered while golang.org/x/sys was Windows-only.
2026-09-20 22:49:55 +02:00

14 lines
374 B
Docker

FROM golang:1.23 AS build
WORKDIR /src
COPY go.mod go.sum ./
COPY cmd ./cmd
COPY internal ./internal
ARG VERSION=dev
RUN CGO_ENABLED=0 go build -ldflags="-s -w -X main.version=${VERSION}" -o /gpu-turnstile ./cmd/gpu-turnstile
FROM gcr.io/distroless/static:nonroot
COPY --from=build /gpu-turnstile /gpu-turnstile
EXPOSE 8188 11434
USER nonroot
ENTRYPOINT ["/gpu-turnstile"]