This commit is contained in:
2026-04-23 21:56:59 +02:00
commit 7a11b5bbbf
17 changed files with 1710 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
# ---- Build stage ----
FROM golang:1.22-alpine AS builder
WORKDIR /src
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -o /bin/davserver ./cmd/server
# ---- Runtime stage ----
FROM alpine:3.19
RUN apk add --no-cache ca-certificates tzdata
WORKDIR /app
COPY --from=builder /bin/davserver /usr/local/bin/davserver
# Default data and config locations
VOLUME ["/app/data"]
COPY config.yaml /app/config.yaml
EXPOSE 8080
ENTRYPOINT ["davserver", "-config", "/app/config.yaml"]