Files
discord_bot/Dockerfile
2024-03-21 18:35:23 +03:00

23 lines
584 B
Docker

FROM python:3.12.2-slim-bookworm as builder
LABEL authors="bacon"
WORKDIR /app
COPY requirements.txt /app
RUN apt-get update -qq \
&& apt-get -qq --no-install-recommends install ffmpeg -y \
&& apt-get clean autoclean -qq \
&&pip wheel install \
--no-cache-dir -q \
--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 -q /wheels/*
COPY src/ /app
ENTRYPOINT ["python", "bot.py"]