Files
graph/Dockerfile
T
zeekayandGitHub 449a3c0478 chore: bump Go toolchain to 1.26.3 (#4)
Pin Go version to 1.26.3 across go.mod, CI workflows, and Dockerfiles
for canonical alignment with the rest of the luxfi/* stack.
2026-05-16 16:43:20 -07:00

25 lines
893 B
Docker

FROM golang:1.26.3-alpine AS build
RUN apk add --no-cache gcc musl-dev sqlite-dev
WORKDIR /src
COPY . .
ARG VERSION=dev
# proxy.golang.org caches inconsistently for hanzoai/[email protected]
# (different POPs serve different zip hashes). -mod=mod populates go.sum
# from whatever the proxy serves at build time and GOSUMDB=off skips
# sum.golang.org cross-checks.
RUN rm -f go.sum && CGO_ENABLED=1 CGO_CFLAGS="-D_LARGEFILE64_SOURCE" GOOS=linux \
GOSUMDB=off go build -mod=mod \
-ldflags "-s -w -X main.version=${VERSION}" \
-o /graphd ./cmd/graphd
FROM alpine:3.21
RUN apk add --no-cache ca-certificates tzdata \
&& addgroup -S graphd && adduser -S graphd -G graphd
COPY --from=build /graphd /usr/local/bin/graphd
USER graphd
VOLUME /data
EXPOSE 8080
HEALTHCHECK --interval=10s --timeout=3s --start-period=5s --retries=3 \
CMD ["graphd", "--version"]
ENTRYPOINT ["graphd"]