diff --git a/Dockerfile b/Dockerfile index 3ba5e86..8c83adf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,6 @@ -FROM ghcr.io/linuxserver/baseimage-alpine:3.15 +# syntax=docker/dockerfile:1 + +FROM ghcr.io/linuxserver/baseimage-alpine:3.17 # set version label ARG BUILD_DATE @@ -26,19 +28,19 @@ RUN \ ffmpeg \ libjpeg-turbo \ p7zip \ - py3-pip \ python3 \ sqlite \ tesseract-ocr && \ echo "**** install pyload ****" && \ if [ -z ${PYLOAD_VERSION+x} ]; then \ - PYLOAD="pyload-ng[all]"; \ - else \ - PYLOAD="pyload-ng[all]==${PYLOAD_VERSION}"; \ + PYLOAD_VERSION=$(curl -sL https://pypi.python.org/pypi/pyload-ng/json |jq -r '. | .info.version'); \ fi && \ - pip3 install -U pip setuptools wheel && \ - pip install -U --find-links https://wheel-index.linuxserver.io/alpine-3.15/ \ - "${PYLOAD}" && \ + python3 -m ensurepip && \ + pip3 install -U --no-cache-dir \ + pip \ + wheel && \ + pip3 install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.17/ \ + pyload-ng[all]=="${PYLOAD_VERSION}" && \ echo "**** cleanup ****" && \ apk del --purge \ build-dependencies && \ diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 6599174..ed0c591 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -1,4 +1,6 @@ -FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.15 +# syntax=docker/dockerfile:1 + +FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.17 # set version label ARG BUILD_DATE @@ -26,19 +28,19 @@ RUN \ ffmpeg \ libjpeg-turbo \ p7zip \ - py3-pip \ python3 \ sqlite \ tesseract-ocr && \ echo "**** install pyload ****" && \ if [ -z ${PYLOAD_VERSION+x} ]; then \ - PYLOAD="pyload-ng[all]"; \ - else \ - PYLOAD="pyload-ng[all]==${PYLOAD_VERSION}"; \ + PYLOAD_VERSION=$(curl -sL https://pypi.python.org/pypi/pyload-ng/json |jq -r '. | .info.version'); \ fi && \ - pip3 install -U pip setuptools wheel && \ - pip install -U --find-links https://wheel-index.linuxserver.io/alpine-3.15/ \ - "${PYLOAD}" && \ + python3 -m ensurepip && \ + pip3 install -U --no-cache-dir \ + pip \ + wheel && \ + pip3 install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.17/ \ + pyload-ng[all]=="${PYLOAD_VERSION}" && \ echo "**** cleanup ****" && \ apk del --purge \ build-dependencies && \ diff --git a/Dockerfile.armhf b/Dockerfile.armhf index e7164c4..d7ba2c9 100644 --- a/Dockerfile.armhf +++ b/Dockerfile.armhf @@ -1,4 +1,6 @@ -FROM ghcr.io/linuxserver/baseimage-alpine:arm32v7-3.15 +# syntax=docker/dockerfile:1 + +FROM ghcr.io/linuxserver/baseimage-alpine:arm32v7-3.17 # set version label ARG BUILD_DATE @@ -26,19 +28,19 @@ RUN \ ffmpeg \ libjpeg-turbo \ p7zip \ - py3-pip \ python3 \ sqlite \ tesseract-ocr && \ echo "**** install pyload ****" && \ if [ -z ${PYLOAD_VERSION+x} ]; then \ - PYLOAD="pyload-ng[all]"; \ - else \ - PYLOAD="pyload-ng[all]==${PYLOAD_VERSION}"; \ + PYLOAD_VERSION=$(curl -sL https://pypi.python.org/pypi/pyload-ng/json |jq -r '. | .info.version'); \ fi && \ - pip3 install -U pip setuptools wheel && \ - pip install -U --find-links https://wheel-index.linuxserver.io/alpine-3.15/ \ - "${PYLOAD}" && \ + python3 -m ensurepip && \ + pip3 install -U --no-cache-dir \ + pip \ + wheel && \ + pip3 install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.17/ \ + pyload-ng[all]=="${PYLOAD_VERSION}" && \ echo "**** cleanup ****" && \ apk del --purge \ build-dependencies && \ diff --git a/readme-vars.yml b/readme-vars.yml index 3940c7c..519619b 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -50,6 +50,7 @@ app_setup_block: | # changelog changelogs: + - { date: "02.02.22:", desc: "Rebase master to alpine 3.17." } - { date: "02.02.22:", desc: "Add ffmpeg for the Youtube plugin." } - { date: "24.01.22:", desc: "Replace unrar with p7zip." } - { date: "24.01.22:", desc: "Initial release." } diff --git a/root/etc/s6-overlay/s6-rc.d/init-config-end/dependencies.d/init-pyload-config b/root/etc/s6-overlay/s6-rc.d/init-config-end/dependencies.d/init-pyload-config new file mode 100644 index 0000000..e69de29 diff --git a/root/etc/s6-overlay/s6-rc.d/init-pyload-config/dependencies.d/init-config b/root/etc/s6-overlay/s6-rc.d/init-pyload-config/dependencies.d/init-config new file mode 100644 index 0000000..e69de29 diff --git a/root/etc/cont-init.d/30-config b/root/etc/s6-overlay/s6-rc.d/init-pyload-config/run old mode 100644 new mode 100755 similarity index 59% rename from root/etc/cont-init.d/30-config rename to root/etc/s6-overlay/s6-rc.d/init-pyload-config/run index 5fac058..bbf1eaf --- a/root/etc/cont-init.d/30-config +++ b/root/etc/s6-overlay/s6-rc.d/init-pyload-config/run @@ -1,4 +1,5 @@ #!/usr/bin/with-contenv bash +# shellcheck shell=bash # create our folders mkdir -p \ @@ -6,14 +7,13 @@ mkdir -p \ /downloads # default config file -[[ ! -f "/config/settings/pyload.cfg" ]] && \ - cp \ - /defaults/pyload.cfg \ - /config/settings/pyload.cfg +cp -n \ + /defaults/pyload.cfg \ + /config/settings/pyload.cfg # permissions echo "[cont-init.d] Setting permissions this may take some time" -chown -R abc:abc \ +lsiown -R abc:abc \ /config -chown abc:abc \ +lsiown abc:abc \ /downloads diff --git a/root/etc/s6-overlay/s6-rc.d/init-pyload-config/type b/root/etc/s6-overlay/s6-rc.d/init-pyload-config/type new file mode 100644 index 0000000..bdd22a1 --- /dev/null +++ b/root/etc/s6-overlay/s6-rc.d/init-pyload-config/type @@ -0,0 +1 @@ +oneshot diff --git a/root/etc/s6-overlay/s6-rc.d/init-pyload-config/up b/root/etc/s6-overlay/s6-rc.d/init-pyload-config/up new file mode 100644 index 0000000..bec4342 --- /dev/null +++ b/root/etc/s6-overlay/s6-rc.d/init-pyload-config/up @@ -0,0 +1 @@ +/etc/s6-overlay/s6-rc.d/init-pyload-config/run diff --git a/root/etc/s6-overlay/s6-rc.d/svc-pyload/dependencies.d/init-services b/root/etc/s6-overlay/s6-rc.d/svc-pyload/dependencies.d/init-services new file mode 100644 index 0000000..e69de29 diff --git a/root/etc/s6-overlay/s6-rc.d/svc-pyload/notification-fd b/root/etc/s6-overlay/s6-rc.d/svc-pyload/notification-fd new file mode 100644 index 0000000..00750ed --- /dev/null +++ b/root/etc/s6-overlay/s6-rc.d/svc-pyload/notification-fd @@ -0,0 +1 @@ +3 diff --git a/root/etc/services.d/pyload/run b/root/etc/s6-overlay/s6-rc.d/svc-pyload/run old mode 100644 new mode 100755 similarity index 54% rename from root/etc/services.d/pyload/run rename to root/etc/s6-overlay/s6-rc.d/svc-pyload/run index bcc4e2e..0878f8b --- a/root/etc/services.d/pyload/run +++ b/root/etc/s6-overlay/s6-rc.d/svc-pyload/run @@ -1,4 +1,6 @@ #!/usr/bin/with-contenv bash +# shellcheck shell=bash exec \ + s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z localhost 8000" \ s6-setuidgid abc pyload --userdir /config --storagedir /downloads diff --git a/root/etc/s6-overlay/s6-rc.d/svc-pyload/type b/root/etc/s6-overlay/s6-rc.d/svc-pyload/type new file mode 100644 index 0000000..5883cff --- /dev/null +++ b/root/etc/s6-overlay/s6-rc.d/svc-pyload/type @@ -0,0 +1 @@ +longrun diff --git a/root/etc/s6-overlay/s6-rc.d/user/contents.d/init-pyload-config b/root/etc/s6-overlay/s6-rc.d/user/contents.d/init-pyload-config new file mode 100644 index 0000000..e69de29 diff --git a/root/etc/s6-overlay/s6-rc.d/user/contents.d/svc-pyload b/root/etc/s6-overlay/s6-rc.d/user/contents.d/svc-pyload new file mode 100644 index 0000000..e69de29