aboutsummaryrefslogtreecommitdiffstats
path: root/Dockerfile
diff options
context:
space:
mode:
authorElvis Claros Castro <elvis@claros.ar>2026-10-03 19:03:27 -0300
committerElvis Claros Castro <elvis@claros.ar>2026-10-03 19:03:27 -0300
commit60c586001cf4d21ef1351be8c8ad7a269a6f005a (patch)
treec3fd1685968c4b3835b8755e73412eeef286dfab /Dockerfile
parent2f8bc985b79e036ca6d34bb680a8858154c17a3b (diff)
downloadclaude-logbook-60c586001cf4d21ef1351be8c8ad7a269a6f005a.tar.gz
claude-logbook-60c586001cf4d21ef1351be8c8ad7a269a6f005a.zip
Share one session through a public link
claude-logbook -s REF --share uploads a session to a share server and prints its link; --shares lists them, --unshare deletes them, --expire picks how long they live. Before uploading it shows what goes up and warns about anything that looks like a credential. server/ is that share server: Go, standard library only, a FROM scratch image. It serves /share/<id> as a page, .txt and .json, accepts only the JSON payload (never HTML), pins the template's scripts with a CSP, keeps secrets hashed and rate-limits per client IP.
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile18
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"]