# ---------- BUILD STAGE ---------- FROM docker.io/python:3.13-alpine AS builder RUN apk add --no-cache build-base ffmpeg-dev libopusenc-dev WORKDIR /build COPY requirements.txt . RUN pip install --prefix=/install -r requirements.txt # ---------- RUNTIME STAGE ---------- FROM docker.io/python:3.13-alpine RUN python3 -m pip uninstall pip -y RUN apk add ffmpeg libopusenc COPY --from=builder /install /usr/local # Définir le répertoire de travail WORKDIR /opt/chatbot COPY . . # OpenShift : permissions pour UID arbitraire RUN chown -R 0:0 /opt/chatbot && chmod -R g+rwX /opt/chatbot # Lancer le bot CMD ["python", "chatbot.py"]