content: FROM rust:1.85-slim AS builder
  
  RUN cargo new --bin app
  
  WORKDIR /app
  
  COPY Cargo.toml Cargo.lock ./
  RUN cargo build --release && rm ./target/release/deps/* src/*.rs
  
  COPY ./src ./src
  
  RUN cargo install --path .
  
  
  FROM debian:bookworm-slim
  
  WORKDIR /app
  
  RUN apt-get update && rm -rf /var/lib/apt/lists/*
  
  COPY --from=builder /app/target/release/app /usr/local/bin/app
  COPY .env ./
  
  RUN useradd -d /app -s /bin/bash api-man
  USER api-man
  
  CMD ["app"]