From b51d33cb373e591d16892bde492616655ac9ec51 Mon Sep 17 00:00:00 2001 From: UMTS at Teleco Date: Sat, 13 Dec 2025 02:59:39 +0100 Subject: committing to insanit --- backend/seckelapi/Containerfile | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 backend/seckelapi/Containerfile (limited to 'backend/seckelapi/Containerfile') diff --git a/backend/seckelapi/Containerfile b/backend/seckelapi/Containerfile new file mode 100644 index 0000000..d36a165 --- /dev/null +++ b/backend/seckelapi/Containerfile @@ -0,0 +1,39 @@ +# Multi-stage build for SeckelAPI +FROM docker.io/library/rust:1.92-slim-trixie AS builder + +WORKDIR /build + +# Install build dependencies +RUN apt-get update && \ + apt-get install -y pkg-config libssl-dev && \ + rm -rf /var/lib/apt/lists/* + +# Copy source code +COPY sources/ . + +# Build release binary +RUN cargo build --release + +# Runtime stage - minimal Debian image +FROM docker.io/library/debian:trixie-slim + +WORKDIR /app + +# Install runtime dependencies +RUN apt-get update && \ + apt-get install -y ca-certificates libssl3 && \ + rm -rf /var/lib/apt/lists/* + +# Copy binary and config from builder +COPY --from=builder /build/target/release/seckelapi /app/seckelapi +COPY sources/config/ /app/config/ + +# Expose API port +EXPOSE 5777 + +# Run as non-root user +RUN useradd -r -u 1000 seckelapi && \ + chown -R seckelapi:seckelapi /app +USER seckelapi + +CMD ["/app/seckelapi"] -- cgit v1.2.3-70-g09d2