FROM golang:1.26-alpine AS builder WORKDIR /app RUN apk add --no-cache git ca-certificates gcc musl-dev COPY go.mod go.sum ./ RUN go mod download COPY . . RUN CGO_ENABLED=1 go build -ldflags="-w -s" -o mautrix-ntfy . FROM alpine:latest RUN apk add --no-cache ca-certificates tzdata WORKDIR /data COPY --from=builder /app/mautrix-ntfy /usr/local/bin/mautrix-ntfy ENTRYPOINT ["mautrix-ntfy"] CMD ["-config", "/data/config.yaml", "-database", "/data/ntfy-bridge.db"]