diff --git a/Dockerfile b/Dockerfile index 5ae6675..b799b6d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,18 @@ # Build Stage -FROM python:3.11.3-slim AS build +FROM python:3.11-slim-bullseye AS build ENV DEBIAN_FRONTEND=noninteractive - -RUN apt update -y && apt install -y git +# Build dummy packages to skip installing them and their dependencies -- Copied from FlareSolverr +RUN apt update -y && apt install -y git \ + && apt-get install -y --no-install-recommends equivs \ + && equivs-control libgl1-mesa-dri \ + && printf 'Section: misc\nPriority: optional\nStandards-Version: 3.9.2\nPackage: libgl1-mesa-dri\nVersion: 99.0.0\nDescription: Dummy package for libgl1-mesa-dri\n' >> libgl1-mesa-dri \ + && equivs-build libgl1-mesa-dri \ + && mv libgl1-mesa-dri_*.deb /libgl1-mesa-dri.deb \ + && equivs-control adwaita-icon-theme \ + && printf 'Section: misc\nPriority: optional\nStandards-Version: 3.9.2\nPackage: adwaita-icon-theme\nVersion: 99.0.0\nDescription: Dummy package for adwaita-icon-theme\n' >> adwaita-icon-theme \ + && equivs-build adwaita-icon-theme \ + && mv adwaita-icon-theme_*.deb /adwaita-icon-theme.deb RUN python3 -m venv /venv ENV PATH=/venv/bin:$PATH @@ -13,16 +22,20 @@ RUN pip install -r requirements.txt && \ pip install uvloop # Buidling final image, moving over venv -FROM python:3.11.3-slim - -ENV DEBIAN_FRONTEND=noninteractive +FROM python:3.11-slim-bullseye WORKDIR /opt/SassBot -RUN apt update -y && apt install -y --no-install-recommends chromium xvfb - -COPY --from=build /venv /venv +ENV DEBIAN_FRONTEND=noninteractive ENV PATH=/venv/bin:$PATH +COPY --from=build /*.deb / +COPY --from=build /venv /venv + +RUN apt update -y && apt install -y --no-install-recommends chromium xvfb \ + # Remove temporary files and hardware decoding libraries -- Copied from FlareSolverr + && rm -rf /var/lib/apt/lists/* \ + && rm -f /usr/lib/x86_64-linux-gnu/libmfxhw* \ + && rm -f /usr/lib/x86_64-linux-gnu/mfx/* COPY . . diff --git a/utils/Notifications.py b/utils/Notifications.py index 207e89e..4070eec 100644 --- a/utils/Notifications.py +++ b/utils/Notifications.py @@ -261,7 +261,7 @@ async def EpNotification(rest: hikari.impl.RESTClientImpl, title, largeThumbnail await rest.create_message(channel = Constants.EP_NOTIFICATION_CHANNEL_ID, content = messageContent, embed=epEmbed, mentions_everyone= IS_PING, role_mentions=IS_PING) async def MvNotification(rest: hikari.impl.RESTClientImpl, title, largeThumbnail, icon, mvUserName, isRerun): - mvLiveStreamUrl = f"https://www.manyvids.com/live/cam/{mvUserName}" + mvLiveStreamUrl = f"https://www.manyvids.com/live/cam/{mvUserName.lower()}" mvOnlineText = Constants.mvAboveEmbedText + "\n<" + mvLiveStreamUrl + ">" embedMaker = EmbedCreator( Constants.mvBelowTitleText,