Files
discord_bot/Dockerfile
2024-03-21 18:27:49 +03:00

23 lines
566 B
Docker

FROM python:3.12.2-slim-bookworm as builder
LABEL authors="bacon"
WORKDIR /app
COPY requirements.txt /app
RUN apt-get update \
&& apt-get --no-install-recommends install ffmpeg -y \
&& apt-get clean autoclean \
&&pip wheel install \
--no-cache-dir \
--no-deps --wheel-dir /app/wheels \
-r requirements.txt
FROM python:3.12.2-slim-bookworm as runner
WORKDIR /app
COPY --from=builder /app/wheels /wheels
COPY --from=builder /usr/bin/ffmpeg /usr/bin/ffmpeg
RUN pip install --no-cache /wheels/*
COPY src/ /app
ENTRYPOINT ["python", "bot.py"]