Fundamental_Analysis/services/report-generator-service/Dockerfile
Lv, Qi a59b994a92 WIP: Commit all pending changes across services, frontend, and docs
- Sync updates for provider services (AlphaVantage, Finnhub, YFinance, Tushare)
- Update Frontend components and pages for recent config changes
- Update API Gateway and Registry
- Include design docs and tasks status
2025-11-27 02:45:56 +08:00

25 lines
1010 B
Docker

# 1. Build Stage
FROM rust:1.90 as builder
WORKDIR /usr/src/app
# Copy full sources (simple and correct; avoids shipping stub binaries)
COPY ./services/common-contracts /usr/src/app/services/common-contracts
COPY ./services/report-generator-service /usr/src/app/services/report-generator-service
WORKDIR /usr/src/app/services/report-generator-service
RUN cargo build --bin report-generator-service
# 2. Runtime Stage
FROM debian:bookworm-slim
# Set timezone
ENV TZ=Asia/Shanghai
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# Minimal runtime deps for health checks (curl) and TLS roots if needed
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates curl && rm -rf /var/lib/apt/lists/*
# Copy the built binary from the builder stage
COPY --from=builder /usr/src/app/services/report-generator-service/target/debug/report-generator-service /usr/local/bin/
# Set the binary as the entrypoint
ENTRYPOINT ["/usr/local/bin/report-generator-service"]