Full pipeline: IMAP ingress -> OpenClaw dispatch -> callback -> SMTP reply. SQLite stateful storage with idempotency, threading, and retry logic. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
30 lines
521 B
Docker
30 lines
521 B
Docker
# ---- Build stage ----
|
|
FROM golang:1.23-alpine AS builder
|
|
|
|
WORKDIR /src
|
|
|
|
# Cache module downloads.
|
|
COPY go.mod go.sum ./
|
|
RUN go mod download
|
|
|
|
COPY . .
|
|
|
|
# CGO disabled — using modernc.org/sqlite (pure Go).
|
|
RUN CGO_ENABLED=0 go build -o /app/bridge ./cmd/bridge
|
|
|
|
# ---- Runtime stage ----
|
|
FROM alpine:3.20
|
|
|
|
RUN apk add --no-cache ca-certificates tzdata
|
|
|
|
WORKDIR /app
|
|
|
|
COPY --from=builder /app/bridge .
|
|
|
|
# Ensure data directory exists for SQLite volume mount.
|
|
RUN mkdir -p /app/data
|
|
|
|
EXPOSE 8080
|
|
|
|
ENTRYPOINT ["./bridge"]
|