fb43306571
Dockerfile fixes: - edu_master/phpsessid-bot: add --no-install-recommends, pin pip versions - edu_master/webinar-checker: pin pip versions with --no-cache-dir - userbot: add SHELL with pipefail for pipe operations Ruff fixes (173 → 0): - W293/W291/W292: whitespace clean via ruff format - N806: camelCase → snake_case (anilist, safone, hearts, flux, etc.) - ARG001/ARG002: prefix unused params with _ - SIM115: use context managers for file I/O - SIM117: combine nested with statements - S608: noqa on SQL f-strings (module name is validated) - E402/N812/N817: import fixes - B023: pass loop variable as argument - I001: auto-sorted imports - syntax: fixed = vs == in dtek_notif/main.py
33 lines
759 B
Docker
33 lines
759 B
Docker
FROM python:3.11-slim AS builder
|
|
|
|
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
|
|
|
WORKDIR /src
|
|
COPY requirements.txt .
|
|
RUN pip install --no-cache-dir --user -r requirements.txt
|
|
|
|
FROM python:3.11-slim
|
|
|
|
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
|
|
|
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"]
|