3c383db9a7
Deploy to Server / deploy (push) Has been cancelled
userbot now lives at ssh://git@gitssh.forust.xyz:2221/forust/userbot.git and is included in homelab as a submodule at userbot/
29 lines
669 B
Docker
29 lines
669 B
Docker
FROM python:3.11-slim AS builder
|
|
|
|
WORKDIR /src
|
|
COPY requirements.txt .
|
|
RUN pip install --no-cache-dir --user -r requirements.txt
|
|
|
|
FROM python:3.11-slim
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
git \
|
|
mediainfo \
|
|
wget \
|
|
xz-utils \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
RUN wget -qO- https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz | \
|
|
tar xJ && \
|
|
cp ffmpeg-*-static/ffmpeg /usr/local/bin/ && \
|
|
cp ffmpeg-*-static/ffprobe /usr/local/bin/ && \
|
|
rm -rf ffmpeg-*
|
|
|
|
COPY --from=builder /root/.local /usr/local
|
|
COPY . /app
|
|
WORKDIR /app
|
|
|
|
ENV PYTHONUNBUFFERED=1
|
|
|
|
CMD ["python", "-u", "main.py"]
|