configuration for self hosting a spindle in docker
at main 29 lines 1.4 kB view raw
1# ── Build stage ─────────────────────────────────────────────────────────────── 2FROM golang:1.25.8-alpine3.23@sha256:8e02eb337d9e0ea459e041f1ee5eece41cbb61f1d83e7d883a3e2fb4862063fa AS builder 3 4RUN apk add --no-cache git gcc musl-dev 5 6WORKDIR /src 7 8# Pin to v1.13.0-alpha; update the SHA here when upgrading 9# Note: 3572988b is the annotated tag object SHA; c3f60dc1 is the actual commit SHA 10RUN git clone --depth 1 --branch v1.13.0-alpha https://tangled.org/tangled.org/core . \ 11 && [ "$(git rev-parse HEAD)" = "c3f60dc17fd6cc709159974f2815a6d14044a106" ] \ 12 || { echo "ERROR: commit SHA mismatch — possible supply chain tampering"; exit 1; } 13 14RUN go mod download 15RUN go mod verify 16RUN CGO_ENABLED=1 go build -o /spindle ./cmd/spindle/main.go 17 18# ── Runtime stage ───────────────────────────────────────────────────────────── 19FROM alpine:3.23.3@sha256:25109184c71bdad752c8312a8623239686a9a2071e8825f20acb8f2198c3f659 20 21RUN apk add --no-cache ca-certificates docker-cli sqlite-libs 22 23COPY --from=builder /spindle /usr/local/bin/spindle 24 25RUN mkdir -p /data /var/log/spindle 26 27EXPOSE 6555 28 29ENTRYPOINT ["/usr/local/bin/spindle"]