From bb9e14f1ac8eac45ba6fb43d5daa702c0367ecce Mon Sep 17 00:00:00 2001 From: aptalca Date: Fri, 14 May 2021 16:38:24 -0400 Subject: [PATCH] update formatting, add lsio wheels --- Dockerfile | 110 +++++++++++++++--------------- Dockerfile.aarch64 | 110 +++++++++++++++--------------- Dockerfile.armhf | 116 ++++++++++++++++---------------- README.md | 1 + readme-vars.yml | 1 + root/etc/cont-init.d/20-config | 8 +-- root/etc/services.d/sabnzbd/run | 4 +- 7 files changed, 176 insertions(+), 174 deletions(-) diff --git a/Dockerfile b/Dockerfile index b99df3c..771fb89 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,61 +13,61 @@ ENV HOME="/config" \ PYTHONIOENCODING=utf-8 RUN \ - echo "***** install gnupg ****" && \ - apt-get update && \ - apt-get install -y \ - gnupg && \ - echo "***** add sabnzbd repositories ****" && \ - apt-key adv --keyserver hkp://keyserver.ubuntu.com:11371 --recv-keys 0x98703123E0F52B2BE16D586EF13930B14BB9F05F && \ - echo "deb http://ppa.launchpad.net/jcfp/ppa/ubuntu bionic main" >> /etc/apt/sources.list.d/sabnzbd.list && \ - echo "deb-src http://ppa.launchpad.net/jcfp/ppa/ubuntu bionic main" >> /etc/apt/sources.list.d/sabnzbd.list && \ - echo "deb http://ppa.launchpad.net/jcfp/sab-addons/ubuntu bionic main" >> /etc/apt/sources.list.d/sabnzbd.list && \ - echo "deb-src http://ppa.launchpad.net/jcfp/sab-addons/ubuntu bionic main" >> /etc/apt/sources.list.d/sabnzbd.list && \ - echo "**** install packages ****" && \ - apt-get update && \ - apt-get install -y \ - jq \ - libffi-dev \ - libssl-dev \ - p7zip-full \ - par2-tbb \ - python3 \ - python3-cryptography \ - python3-distutils \ - python3-pip \ - unrar && \ - if [ -z ${SABNZBD_VERSION+x} ]; then \ - SABNZBD_VERSION=$(curl -s https://api.github.com/repos/sabnzbd/sabnzbd/releases \ - | jq -r 'first(.[]) | .tag_name'); \ - fi && \ - mkdir -p /app/sabnzbd && \ - curl -o \ - /tmp/sabnzbd.tar.gz -L \ - "https://github.com/sabnzbd/sabnzbd/releases/download/${SABNZBD_VERSION}/SABnzbd-${SABNZBD_VERSION}-src.tar.gz" && \ - tar xf \ - /tmp/sabnzbd.tar.gz -C \ - /app/sabnzbd --strip-components=1 && \ - cd /app/sabnzbd && \ - pip3 install -U pip && \ - pip install -U --no-cache-dir \ - apprise \ - pynzb \ - requests && \ - pip install -U --no-cache-dir -r requirements.txt && \ - echo "**** cleanup ****" && \ - ln -s \ - /usr/bin/python3 \ - /usr/bin/python && \ - apt-get purge --auto-remove -y \ - libffi-dev \ - libssl-dev \ - python3-pip && \ - apt-get clean && \ - rm -rf \ - /tmp/* \ - /var/lib/apt/lists/* \ - /var/tmp/* \ - $HOME/.cache + echo "***** install gnupg ****" && \ + apt-get update && \ + apt-get install -y \ + gnupg && \ + echo "***** add sabnzbd repositories ****" && \ + apt-key adv --keyserver hkp://keyserver.ubuntu.com:11371 --recv-keys 0x98703123E0F52B2BE16D586EF13930B14BB9F05F && \ + echo "deb http://ppa.launchpad.net/jcfp/ppa/ubuntu bionic main" >> /etc/apt/sources.list.d/sabnzbd.list && \ + echo "deb-src http://ppa.launchpad.net/jcfp/ppa/ubuntu bionic main" >> /etc/apt/sources.list.d/sabnzbd.list && \ + echo "deb http://ppa.launchpad.net/jcfp/sab-addons/ubuntu bionic main" >> /etc/apt/sources.list.d/sabnzbd.list && \ + echo "deb-src http://ppa.launchpad.net/jcfp/sab-addons/ubuntu bionic main" >> /etc/apt/sources.list.d/sabnzbd.list && \ + echo "**** install packages ****" && \ + apt-get update && \ + apt-get install -y \ + jq \ + libffi-dev \ + libssl-dev \ + p7zip-full \ + par2-tbb \ + python3 \ + python3-cryptography \ + python3-distutils \ + python3-pip \ + unrar && \ + if [ -z ${SABNZBD_VERSION+x} ]; then \ + SABNZBD_VERSION=$(curl -s https://api.github.com/repos/sabnzbd/sabnzbd/releases \ + | jq -r 'first(.[]) | .tag_name'); \ + fi && \ + mkdir -p /app/sabnzbd && \ + curl -o \ + /tmp/sabnzbd.tar.gz -L \ + "https://github.com/sabnzbd/sabnzbd/releases/download/${SABNZBD_VERSION}/SABnzbd-${SABNZBD_VERSION}-src.tar.gz" && \ + tar xf \ + /tmp/sabnzbd.tar.gz -C \ + /app/sabnzbd --strip-components=1 && \ + cd /app/sabnzbd && \ + pip3 install -U pip && \ + pip install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/ubuntu/ \ + apprise \ + pynzb \ + requests && \ + pip install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/ubuntu/ -r requirements.txt && \ + echo "**** cleanup ****" && \ + ln -s \ + /usr/bin/python3 \ + /usr/bin/python && \ + apt-get purge --auto-remove -y \ + libffi-dev \ + libssl-dev \ + python3-pip && \ + apt-get clean && \ + rm -rf \ + /tmp/* \ + /var/lib/apt/lists/* \ + /var/tmp/* \ + $HOME/.cache # add local files COPY root/ / diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 5c50a4b..a2e5f8f 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -13,61 +13,61 @@ ENV HOME="/config" \ PYTHONIOENCODING=utf-8 RUN \ - echo "***** install gnupg ****" && \ - apt-get update && \ - apt-get install -y \ - gnupg && \ - echo "***** add sabnzbd repositories ****" && \ - apt-key adv --keyserver hkp://keyserver.ubuntu.com:11371 --recv-keys 0x98703123E0F52B2BE16D586EF13930B14BB9F05F && \ - echo "deb http://ppa.launchpad.net/jcfp/ppa/ubuntu bionic main" >> /etc/apt/sources.list.d/sabnzbd.list && \ - echo "deb-src http://ppa.launchpad.net/jcfp/ppa/ubuntu bionic main" >> /etc/apt/sources.list.d/sabnzbd.list && \ - echo "deb http://ppa.launchpad.net/jcfp/sab-addons/ubuntu bionic main" >> /etc/apt/sources.list.d/sabnzbd.list && \ - echo "deb-src http://ppa.launchpad.net/jcfp/sab-addons/ubuntu bionic main" >> /etc/apt/sources.list.d/sabnzbd.list && \ - echo "**** install packages ****" && \ - apt-get update && \ - apt-get install -y \ - jq \ - libffi-dev \ - libssl-dev \ - p7zip-full \ - par2-tbb \ - python3 \ - python3-cryptography \ - python3-distutils \ - python3-pip \ - unrar && \ - if [ -z ${SABNZBD_VERSION+x} ]; then \ - SABNZBD_VERSION=$(curl -s https://api.github.com/repos/sabnzbd/sabnzbd/releases \ - | jq -r 'first(.[]) | .tag_name'); \ - fi && \ - mkdir -p /app/sabnzbd && \ - curl -o \ - /tmp/sabnzbd.tar.gz -L \ - "https://github.com/sabnzbd/sabnzbd/releases/download/${SABNZBD_VERSION}/SABnzbd-${SABNZBD_VERSION}-src.tar.gz" && \ - tar xf \ - /tmp/sabnzbd.tar.gz -C \ - /app/sabnzbd --strip-components=1 && \ - cd /app/sabnzbd && \ - pip3 install -U pip && \ - pip install -U --no-cache-dir \ - apprise \ - pynzb \ - requests && \ - pip install -U --no-cache-dir -r requirements.txt && \ - echo "**** cleanup ****" && \ - ln -s \ - /usr/bin/python3 \ - /usr/bin/python && \ - apt-get purge --auto-remove -y \ - libffi-dev \ - libssl-dev \ - python3-pip && \ - apt-get clean && \ - rm -rf \ - /tmp/* \ - /var/lib/apt/lists/* \ - /var/tmp/* \ - $HOME/.cache + echo "***** install gnupg ****" && \ + apt-get update && \ + apt-get install -y \ + gnupg && \ + echo "***** add sabnzbd repositories ****" && \ + apt-key adv --keyserver hkp://keyserver.ubuntu.com:11371 --recv-keys 0x98703123E0F52B2BE16D586EF13930B14BB9F05F && \ + echo "deb http://ppa.launchpad.net/jcfp/ppa/ubuntu bionic main" >> /etc/apt/sources.list.d/sabnzbd.list && \ + echo "deb-src http://ppa.launchpad.net/jcfp/ppa/ubuntu bionic main" >> /etc/apt/sources.list.d/sabnzbd.list && \ + echo "deb http://ppa.launchpad.net/jcfp/sab-addons/ubuntu bionic main" >> /etc/apt/sources.list.d/sabnzbd.list && \ + echo "deb-src http://ppa.launchpad.net/jcfp/sab-addons/ubuntu bionic main" >> /etc/apt/sources.list.d/sabnzbd.list && \ + echo "**** install packages ****" && \ + apt-get update && \ + apt-get install -y \ + jq \ + libffi-dev \ + libssl-dev \ + p7zip-full \ + par2-tbb \ + python3 \ + python3-cryptography \ + python3-distutils \ + python3-pip \ + unrar && \ + if [ -z ${SABNZBD_VERSION+x} ]; then \ + SABNZBD_VERSION=$(curl -s https://api.github.com/repos/sabnzbd/sabnzbd/releases \ + | jq -r 'first(.[]) | .tag_name'); \ + fi && \ + mkdir -p /app/sabnzbd && \ + curl -o \ + /tmp/sabnzbd.tar.gz -L \ + "https://github.com/sabnzbd/sabnzbd/releases/download/${SABNZBD_VERSION}/SABnzbd-${SABNZBD_VERSION}-src.tar.gz" && \ + tar xf \ + /tmp/sabnzbd.tar.gz -C \ + /app/sabnzbd --strip-components=1 && \ + cd /app/sabnzbd && \ + pip3 install -U pip && \ + pip install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/ubuntu/ \ + apprise \ + pynzb \ + requests && \ + pip install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/ubuntu/ -r requirements.txt && \ + echo "**** cleanup ****" && \ + ln -s \ + /usr/bin/python3 \ + /usr/bin/python && \ + apt-get purge --auto-remove -y \ + libffi-dev \ + libssl-dev \ + python3-pip && \ + apt-get clean && \ + rm -rf \ + /tmp/* \ + /var/lib/apt/lists/* \ + /var/tmp/* \ + $HOME/.cache # add local files COPY root/ / diff --git a/Dockerfile.armhf b/Dockerfile.armhf index f321bf4..0307d4e 100644 --- a/Dockerfile.armhf +++ b/Dockerfile.armhf @@ -13,64 +13,64 @@ ENV HOME="/config" \ PYTHONIOENCODING=utf-8 RUN \ - echo "***** install gnupg ****" && \ - apt-get update && \ - apt-get install -y \ - gnupg && \ - echo "***** add sabnzbd repositories ****" && \ - apt-key adv --keyserver hkp://keyserver.ubuntu.com:11371 --recv-keys 0x98703123E0F52B2BE16D586EF13930B14BB9F05F && \ - echo "deb http://ppa.launchpad.net/jcfp/ppa/ubuntu bionic main" >> /etc/apt/sources.list.d/sabnzbd.list && \ - echo "deb-src http://ppa.launchpad.net/jcfp/ppa/ubuntu bionic main" >> /etc/apt/sources.list.d/sabnzbd.list && \ - echo "deb http://ppa.launchpad.net/jcfp/sab-addons/ubuntu bionic main" >> /etc/apt/sources.list.d/sabnzbd.list && \ - echo "deb-src http://ppa.launchpad.net/jcfp/sab-addons/ubuntu bionic main" >> /etc/apt/sources.list.d/sabnzbd.list && \ - echo "**** install packages ****" && \ - apt-get update && \ - apt-get install -y \ - jq \ - libffi-dev \ - libssl-dev \ - p7zip-full \ - par2-tbb \ - python3 \ - python3-cryptography \ - python3-distutils \ - python3-pip \ - rustc \ - unrar && \ - if [ -z ${SABNZBD_VERSION+x} ]; then \ - SABNZBD_VERSION=$(curl -s https://api.github.com/repos/sabnzbd/sabnzbd/releases \ - | jq -r 'first(.[]) | .tag_name'); \ - fi && \ - mkdir -p /app/sabnzbd && \ - curl -o \ - /tmp/sabnzbd.tar.gz -L \ - "https://github.com/sabnzbd/sabnzbd/releases/download/${SABNZBD_VERSION}/SABnzbd-${SABNZBD_VERSION}-src.tar.gz" && \ - tar xf \ - /tmp/sabnzbd.tar.gz -C \ - /app/sabnzbd --strip-components=1 && \ - cd /app/sabnzbd && \ - pip3 install -U pip && \ - pip install -U --no-cache-dir \ - apprise \ - pynzb \ - requests && \ - pip install -U --no-cache-dir -r requirements.txt && \ - echo "**** cleanup ****" && \ - ln -s \ - /usr/bin/python3 \ - /usr/bin/python && \ - apt-get purge --auto-remove -y \ - libffi-dev \ - libssl-dev \ - python3-pip \ - rustc && \ - apt-get clean && \ - rm -rf \ - /tmp/* \ - /var/lib/apt/lists/* \ - /var/tmp/* \ - $HOME/.cache \ - $HOME/.cargo + echo "***** install gnupg ****" && \ + apt-get update && \ + apt-get install -y \ + gnupg && \ + echo "***** add sabnzbd repositories ****" && \ + apt-key adv --keyserver hkp://keyserver.ubuntu.com:11371 --recv-keys 0x98703123E0F52B2BE16D586EF13930B14BB9F05F && \ + echo "deb http://ppa.launchpad.net/jcfp/ppa/ubuntu bionic main" >> /etc/apt/sources.list.d/sabnzbd.list && \ + echo "deb-src http://ppa.launchpad.net/jcfp/ppa/ubuntu bionic main" >> /etc/apt/sources.list.d/sabnzbd.list && \ + echo "deb http://ppa.launchpad.net/jcfp/sab-addons/ubuntu bionic main" >> /etc/apt/sources.list.d/sabnzbd.list && \ + echo "deb-src http://ppa.launchpad.net/jcfp/sab-addons/ubuntu bionic main" >> /etc/apt/sources.list.d/sabnzbd.list && \ + echo "**** install packages ****" && \ + apt-get update && \ + apt-get install -y \ + jq \ + libffi-dev \ + libssl-dev \ + p7zip-full \ + par2-tbb \ + python3 \ + python3-cryptography \ + python3-distutils \ + python3-pip \ + rustc \ + unrar && \ + if [ -z ${SABNZBD_VERSION+x} ]; then \ + SABNZBD_VERSION=$(curl -s https://api.github.com/repos/sabnzbd/sabnzbd/releases \ + | jq -r 'first(.[]) | .tag_name'); \ + fi && \ + mkdir -p /app/sabnzbd && \ + curl -o \ + /tmp/sabnzbd.tar.gz -L \ + "https://github.com/sabnzbd/sabnzbd/releases/download/${SABNZBD_VERSION}/SABnzbd-${SABNZBD_VERSION}-src.tar.gz" && \ + tar xf \ + /tmp/sabnzbd.tar.gz -C \ + /app/sabnzbd --strip-components=1 && \ + cd /app/sabnzbd && \ + pip3 install -U pip && \ + pip install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/ubuntu/ \ + apprise \ + pynzb \ + requests && \ + pip install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/ubuntu/ -r requirements.txt && \ + echo "**** cleanup ****" && \ + ln -s \ + /usr/bin/python3 \ + /usr/bin/python && \ + apt-get purge --auto-remove -y \ + libffi-dev \ + libssl-dev \ + python3-pip \ + rustc && \ + apt-get clean && \ + rm -rf \ + /tmp/* \ + /var/lib/apt/lists/* \ + /var/tmp/* \ + $HOME/.cache \ + $HOME/.cargo # add local files COPY root/ / diff --git a/README.md b/README.md index 7ededfb..a12f0a3 100644 --- a/README.md +++ b/README.md @@ -242,6 +242,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64 ## Versions +* **14.05.21:** - Use linuxserver.io wheel index for pip packages. * **12.02.21:** - Clean up rust/cargo and pip cache. * **17.08.20:** - Switch to running from source with python3 instead of ppa. * **08.05.20:** - Switch to `ppa:jcfp/ppa`. diff --git a/readme-vars.yml b/readme-vars.yml index 44b82f8..7174cba 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -58,6 +58,7 @@ app_setup_block: | # changelog changelogs: + - { date: "14.05.21:", desc: "Use linuxserver.io wheel index for pip packages." } - { date: "12.02.21:", desc: "Clean up rust/cargo and pip cache." } - { date: "17.08.20:", desc: "Switch to running from source with python3 instead of ppa." } - { date: "08.05.20:", desc: "Switch to `ppa:jcfp/ppa`." } diff --git a/root/etc/cont-init.d/20-config b/root/etc/cont-init.d/20-config index 9de439b..0bfeb15 100644 --- a/root/etc/cont-init.d/20-config +++ b/root/etc/cont-init.d/20-config @@ -2,11 +2,11 @@ # make folders mkdir -p \ - /downloads \ - /incomplete-downloads + /downloads \ + /incomplete-downloads # permissions chown abc:abc \ - /downloads \ - /incomplete-downloads + /downloads \ + /incomplete-downloads diff --git a/root/etc/services.d/sabnzbd/run b/root/etc/services.d/sabnzbd/run index 5c18516..cd14fdc 100644 --- a/root/etc/services.d/sabnzbd/run +++ b/root/etc/services.d/sabnzbd/run @@ -1,7 +1,7 @@ #!/usr/bin/with-contenv bash exec \ - s6-setuidgid abc python3 /app/sabnzbd/SABnzbd.py \ - --config-file /config --server 0.0.0.0:8080 + s6-setuidgid abc python3 /app/sabnzbd/SABnzbd.py \ + --config-file /config --server 0.0.0.0:8080