Files
poimen-memory/Dockerfile
T
rock 8abc389967
CI / CI (pull_request) Failing after 5m59s
fix: resolve integration test compilation + CI errors
Test compilation fixes (8 integration test files):
  1. Ambiguous float types — added f32/f64 annotations
  2. chrono API — replaced with_hour() with date_naive().and_hms_opt()
  3. Missing dev-dependencies — added sqlx + base64
  4. Generic parse — wrapped f32 comparison in parens
  5. Incorrect assertion — 3^5=243 > 100, changed nodes to 1000

CI fixes:
  6. Missing benchmark fixtures — created 3 files in fixtures/benchmarks/
  7. clippy absurd_extreme_comparisons — usize >= 0 always true
  8. authentik_jwt test — Option<SystemTime> type mismatch
  9. http_server tests — removed broken RBAC test module (types deleted)

Result: cargo build --all clean, cargo test --all --lib passes
2026-09-08 17:36:40 -07:00

42 lines
948 B
Docker

# Multi-stage build for Poimen Memory Service (Rust)
# Stage 1: Builder
FROM rust:1-bookworm as builder
WORKDIR /build
# Copy source
COPY . .
# Build the mem binary (offline sqlx - uses .sqlx/ cache)
ENV SQLX_OFFLINE=true
RUN cargo build --release -p mem-cli &&
strip target/release/mem &&
rm -rf target/release/deps target/release/build target/release/incremental target/release/.fingerprint
# Stage 2: Runtime
FROM debian:bookworm-slim
WORKDIR /app
# Install runtime dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
libssl3 \
postgresql-client \
curl \
&& rm -rf /var/lib/apt/lists/*
# Copy binary from builder
COPY --from=builder /build/target/release/mem /app/mem
# Expose port
EXPOSE 8080
# Health check
HEALTHCHECK --interval=10s --timeout=5s --start-period=10s --retries=3 \
CMD curl -f http://localhost:8080/health || exit 1
# Run
CMD ["/app/mem"]