# Build Stage
FROM rust:1.92-bookworm as builder
WORKDIR /usr/src/app
COPY . .
# Build release binary
RUN cargo build --release --locked --bin apicentric
# Runtime Stage
FROM debian:bookworm-slim
# Install runtime dependencies (OpenSSL, etc.)
RUN apt-get update && apt-get install -y \
ca-certificates \
libssl-dev \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Copy binary from builder
COPY --from=builder /usr/src/app/target/release/apicentric /usr/local/bin/
# Copy services dir and config if needed (optional defaults)
# COPY services ./services
EXPOSE 9002
ENTRYPOINT ["apicentric"]
CMD ["simulator", "start"]