diff options
Diffstat (limited to 'Dockerfile')
| -rw-r--r-- | Dockerfile | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..5e9048b --- /dev/null +++ b/Dockerfile @@ -0,0 +1,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"] |