From 4ec2ff6a313fcfe2189ea9358705e10a6e0d77e0 Mon Sep 17 00:00:00 2001 From: Devin Buhl Date: Wed, 28 Aug 2024 11:59:13 -0400 Subject: [PATCH] fix(bazarr): can haz python 3.12? (#1086) --- apps/bazarr/Dockerfile | 32 +++++++++++++++++--------------- apps/bazarr/entrypoint.sh | 2 +- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/apps/bazarr/Dockerfile b/apps/bazarr/Dockerfile index 89e6cc715..fae3056eb 100644 --- a/apps/bazarr/Dockerfile +++ b/apps/bazarr/Dockerfile @@ -1,4 +1,4 @@ -FROM docker.io/library/python:3.11-alpine +FROM docker.io/library/python:3.12-alpine ARG TARGETPLATFORM ARG VERSION @@ -28,6 +28,8 @@ RUN \ curl \ ffmpeg \ jq \ + libxml2 \ + libxslt \ mediainfo \ nano \ tzdata \ @@ -35,22 +37,22 @@ RUN \ libpq \ && \ apk add --no-cache --virtual .build-deps \ - gcc \ + build-base \ + cargo \ libffi-dev \ - musl-dev \ - postgresql-dev \ - && \ - pip install --upgrade "cryptography>=42.0.7" \ - pip install --upgrade "gevent>=24.2.1" \ - pip install --upgrade "lxml>=4.3.0, <5.0.0" \ - pip install --upgrade "numpy>=1.12.0" \ - pip install --upgrade --only-binary=Pillow "Pillow>=9.0.0" \ - pip install --upgrade "psycopg2>=2.9.9" \ - pip install --upgrade "setuptools>=70.0.0" \ - pip install --upgrade "webrtcvad-wheels>=2.0.10" \ + libpq-dev \ + libxml2-dev \ + libxslt-dev \ && \ curl -fsSL -o /tmp/app.zip "https://github.com/morpheus65535/bazarr/releases/download/v${VERSION}/bazarr.zip" \ - && unzip -q /tmp/app.zip -d /app \ + && unzip -q /tmp/app.zip -d /app/bin \ + && \ + rm -rf /app/bin/bin \ + && \ + printf "UpdateMethod=docker\nBranch=master\nPackageVersion=%s\nPackageAuthor=[onedr0p](https://github.com/onedr0p)\n" "${VERSION}" > /app/package_info \ + && pip install --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.20/ \ + --requirement /app/bin/requirements.txt \ + --requirement /app/bin/postgres-requirements.txt \ && chown -R root:root /app \ && chmod -R 755 /app \ && apk del --purge .build-deps \ @@ -60,7 +62,7 @@ RUN \ /tmp/* COPY ./apps/bazarr/entrypoint.sh /entrypoint.sh -COPY --from=ghcr.io/linuxserver/unrar:7.0.7 /usr/bin/unrar-alpine /usr/bin/unrar +COPY --from=ghcr.io/linuxserver/unrar:7.0.9 /usr/bin/unrar-alpine /usr/bin/unrar USER nobody:nogroup WORKDIR /config diff --git a/apps/bazarr/entrypoint.sh b/apps/bazarr/entrypoint.sh index f16448781..ddf16c680 100755 --- a/apps/bazarr/entrypoint.sh +++ b/apps/bazarr/entrypoint.sh @@ -3,7 +3,7 @@ #shellcheck disable=SC2086 exec \ /usr/local/bin/python \ - /app/bazarr.py \ + /app/bin/bazarr.py \ --no-update \ --config /config \ --port ${BAZARR__PORT:-6767} \