Fix Docker build, ship nidusctl in the image, document user setup via compose
Docker release / docker (push) Failing after 26s

- Bump the builder image to golang:1.25-alpine to match go.mod's "go
  1.25.0" requirement — the previous 1.22 base failed to build at all.
- Stop COPYing the git-ignored config.yaml (which doesn't exist in a
  fresh checkout, breaking CI/release builds); ship config.example.yaml
  as the image's default instead, same as it's already overridden via
  a volume mount in docker-compose.yaml.
- Build and include the nidusctl binary in the runtime image so users
  can create their first user/calendars/address books straight from a
  running container via `docker compose exec`, without installing Go.
- README: document that Docker workflow, mention the pre-built
  multi-arch images published by the new release CI, and drop the
  "Client configuration" section — how to configure a given DAV client
  is out of scope for this project's docs.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-08-21 16:37:44 +02:00
co-authored by Copilot
parent 63b59a73fe
commit f7375d7eba
2 changed files with 29 additions and 22 deletions
+7 -2
View File
@@ -1,5 +1,5 @@
# ---- Build stage ----
FROM golang:1.22-alpine AS builder
FROM golang:1.25-alpine AS builder
WORKDIR /src
COPY go.mod go.sum ./
@@ -7,6 +7,7 @@ RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -o /bin/davserver ./cmd/server
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -o /bin/nidusctl ./tools/nidusctl
# ---- Runtime stage ----
FROM alpine:3.19
@@ -15,10 +16,14 @@ RUN apk add --no-cache ca-certificates tzdata
WORKDIR /app
COPY --from=builder /bin/davserver /usr/local/bin/davserver
COPY --from=builder /bin/nidusctl /usr/local/bin/nidusctl
# Default data and config locations
VOLUME ["/app/data"]
COPY config.yaml /app/config.yaml
# config.yaml itself is git-ignored (it holds real secrets), so the image
# ships the example config as a working default; mount your own
# config.yaml over /app/config.yaml (see docker-compose.yaml) to override it.
COPY config.example.yaml /app/config.yaml
EXPOSE 8080