ARG DEBIAN_VERSION=bookworm-slim # ========================================== # Stage 1: Runtime Base Environment # ========================================== FROM debian:${DEBIAN_VERSION} AS base # Install minimalist system requirements for network fetching RUN apt-get update && apt-get install -y --no-install-recommends \ python3 python3-pip curl ca-certificates \ && rm -rf /var/lib/apt/lists/* # Set up global storage workspace directory inside the container WORKDIR /app # Install native Python dependencies directly (Cached and fast) RUN pip install --no-cache-dir --break-system-packages curl-cffi beautifulsoup4