aboutsummaryrefslogtreecommitdiffstats
path: root/Dockerfile
blob: 5e9048b61032f47088b387e3abb6aee198d86942 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# Share server for claude-logbook (see server/README.md).
# Built from the repo root: it embeds claude_logbook/template.html.
FROM golang:1.23-alpine AS build
WORKDIR /src
COPY server/ ./
COPY claude_logbook/template.html ./template.html
RUN CGO_ENABLED=0 go test ./... \
 && CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o /out/server . \
 && mkdir -p /out/data

FROM scratch
COPY --from=build /out/server /server
COPY --from=build --chown=65534:65534 /out/data /data
USER 65534:65534
EXPOSE 8181
VOLUME /data
HEALTHCHECK --interval=30s --timeout=5s CMD ["/server", "-healthcheck"]
ENTRYPOINT ["/server"]