FROM python:3.14-slim WORKDIR /app # Install dependencies first (layer caching) COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy bot COPY bot.py . # Non-root user RUN useradd --no-create-home --shell /bin/false botuser USER botuser CMD ["python", "bot.py"]