FROM python:3.12-alpine # Alpine's package manager (apk) doesn't pull in 300MB of useless dependencies RUN apk add --no-cache ffmpeg WORKDIR /app COPY requirements.txt . # --no-cache-dir is mandatory or pip leaves a bunch of trash behind RUN pip install --no-cache-dir -r requirements.txt COPY main.py . EXPOSE 8000 CMD ["python3", "main.py"]