FROM rust:1.85 AS builder RUN apt-get update && apt-get install -y --no-install-recommends musl-tools \ && rm -rf /var/lib/apt/lists/* WORKDIR /app COPY . . ENV SQLX_OFFLINE=true RUN cargo build --release --target x86_64-unknown-linux-musl FROM alpine:3.21 RUN apk add --no-cache ca-certificates COPY --from=builder /app/target/x86_64-unknown-linux-musl/release/sarmentine /usr/local/bin/sarmentine COPY --from=builder /app/templates /app/templates COPY --from=builder /app/static /app/static WORKDIR /app EXPOSE 3000 ENV SARMENTINE_BIND_ADDR=0.0.0.0:3000 ENV SARMENTINE_STATIC_DIR=/app/static CMD ["sarmentine"]