content: FROM debian:12-slim
  
  ENV DEBIAN_FRONTEND=noninteractive
  
  ARG RUST_VERSION=1.88.0
  ARG RUSTUP_VERSION=1.28.2
  
  RUN apt-get update && \
      apt-get install -y --no-install-recommends \
      curl \
      wget \
      build-essential \
      pkg-config \
      libssl-dev \
      ca-certificates && \
      rm -rf /var/lib/apt/lists/*
  
  ENV RUSTUP_HOME=/usr/local/rustup \
      CARGO_HOME=/usr/local/cargo \
      PATH=/usr/local/cargo/bin:$PATH
  
  RUN set -eux; \
      dpkgArch="$(dpkg --print-architecture)"; \
      case "${dpkgArch##*-}" in \
          amd64) rustArch='x86_64-unknown-linux-gnu' ;; \
          armhf) rustArch='armv7-unknown-linux-gnueabihf' ;; \
          arm64) rustArch='aarch64-unknown-linux-gnu' ;; \
          i386) rustArch='i686-unknown-linux-gnu' ;; \
          ppc64el) rustArch='powerpc64le-unknown-linux-gnu' ;; \
          s390x) rustArch='s390x-unknown-linux-gnu' ;; \
          *) echo >&2 "unsupported architecture: ${dpkgArch}"; exit 1 ;; \
      esac; \
      url="https://static.rust-lang.org/rustup/archive/$RUSTUP_VERSION/${rustArch}/rustup-init"; \
      wget "$url"; \
      chmod +x rustup-init; \
      ./rustup-init -y --no-modify-path --profile minimal --default-toolchain $RUST_VERSION --default-host ${rustArch}; \
      rm rustup-init; \
      chmod -R a+w $RUSTUP_HOME $CARGO_HOME; \
      rustup --version; \
      cargo --version; \
      rustc --version;
  
  WORKDIR /app
  
  