Files
canon/Dockerfile
T
cdnutterandClaude Opus 5.5 72b49d709a Drop the Dockerfile syntax directive
It made every build pull docker/dockerfile from Docker Hub, which fails
on hosts with rejected Hub credentials. The Dockerfile uses nothing the
built-in frontend lacks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 14:15:47 -07:00

23 lines
648 B
Docker

FROM golang:1-alpine AS build
WORKDIR /src
COPY go.mod go.sum ./
RUN go mod download
COPY . .
ARG VERSION=dev
RUN CGO_ENABLED=0 go build -trimpath -ldflags "-s -w -X main.version=${VERSION}" -o /out/canon ./cmd/canon
FROM alpine:3
RUN apk add --no-cache ca-certificates tzdata \
&& adduser -D -u 1000 canon \
&& mkdir -p /data && chown canon:canon /data
COPY --from=build /out/canon /usr/local/bin/canon
USER canon
ENV CANON_DATA_DIR=/data \
CANON_PORT=4242
VOLUME /data
EXPOSE 4242
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s \
CMD wget -qO- http://127.0.0.1:${CANON_PORT}/healthz >/dev/null || exit 1
ENTRYPOINT ["canon"]