From 33ef84fc77b23c151dec3bd8d04b5d4d5796a979 Mon Sep 17 00:00:00 2001 From: TheSpad Date: Tue, 25 Jan 2022 21:14:06 +0000 Subject: [PATCH] Rebase to Alpine --- Dockerfile | 60 ++++++--------- Dockerfile.aarch64 | 60 ++++++--------- Dockerfile.armhf | 65 +++++++--------- jenkins-vars.yml | 2 +- package_versions.txt | 172 ------------------------------------------- readme-vars.yml | 4 +- 6 files changed, 76 insertions(+), 287 deletions(-) delete mode 100755 package_versions.txt diff --git a/Dockerfile b/Dockerfile index 12f724f..6f6a7d1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,45 +1,36 @@ -FROM ghcr.io/linuxserver/baseimage-ubuntu:focal +FROM ghcr.io/linuxserver/baseimage-alpine:3.15 # set version label ARG BUILD_DATE ARG VERSION ARG SABNZBD_VERSION LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" -LABEL maintainer="thelamer" +LABEL maintainer="thespad" -# environment settings -ARG DEBIAN_FRONTEND="noninteractive" +# environment settings 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 focal main" >> /etc/apt/sources.list.d/sabnzbd.list && \ - echo "deb-src http://ppa.launchpad.net/jcfp/ppa/ubuntu focal main" >> /etc/apt/sources.list.d/sabnzbd.list && \ - echo "deb http://ppa.launchpad.net/jcfp/sab-addons/ubuntu focal main" >> /etc/apt/sources.list.d/sabnzbd.list && \ - echo "deb-src http://ppa.launchpad.net/jcfp/sab-addons/ubuntu focal main" >> /etc/apt/sources.list.d/sabnzbd.list && \ echo "**** install packages ****" && \ - apt-get update && \ - apt-get install -y \ + apk add -U --update --no-cache --virtual=build-dependencies \ + build-base \ + gcc \ jq \ libffi-dev \ - libssl-dev \ - p7zip-full \ - par2-tbb \ + openssl-dev \ + python3-dev && \ + apk add -U --update --no-cache \ + curl \ + p7zip \ + par2cmdline \ python3 \ - python3-cryptography \ - python3-distutils \ - python3-pip \ - python3-setuptools \ + py3-pip && \ + apk add -U --update --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/v3.14/main \ unrar && \ if [ -z ${SABNZBD_VERSION+x} ]; then \ SABNZBD_VERSION=$(curl -s https://api.github.com/repos/sabnzbd/sabnzbd/releases \ - | jq -r 'first(.[]) | .tag_name'); \ + | jq -r 'first(.[] | select(.prerelease==true)) | .tag_name'); \ fi && \ mkdir -p /app/sabnzbd && \ curl -o \ @@ -49,30 +40,27 @@ RUN \ /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/ \ + python3 -m pip install --upgrade pip && \ + pip3 install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine/ \ + wheel \ apprise \ pynzb \ requests && \ - pip install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/ubuntu/ -r requirements.txt && \ + pip3 install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine/ -r requirements.txt && \ + pip3 cache purge && \ 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 && \ + apk del --purge \ + build-dependencies && \ rm -rf \ /tmp/* \ - /var/lib/apt/lists/* \ - /var/tmp/* \ $HOME/.cache -# add local files +# add local files COPY root/ / # ports and volumes -EXPOSE 8080 9090 +EXPOSE 8080 VOLUME /config diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index ab19160..9675dfd 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -1,45 +1,36 @@ -FROM ghcr.io/linuxserver/baseimage-ubuntu:arm64v8-focal +FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.15 # set version label ARG BUILD_DATE ARG VERSION ARG SABNZBD_VERSION LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" -LABEL maintainer="thelamer" +LABEL maintainer="thespad" -# environment settings -ARG DEBIAN_FRONTEND="noninteractive" +# environment settings 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 focal main" >> /etc/apt/sources.list.d/sabnzbd.list && \ - echo "deb-src http://ppa.launchpad.net/jcfp/ppa/ubuntu focal main" >> /etc/apt/sources.list.d/sabnzbd.list && \ - echo "deb http://ppa.launchpad.net/jcfp/sab-addons/ubuntu focal main" >> /etc/apt/sources.list.d/sabnzbd.list && \ - echo "deb-src http://ppa.launchpad.net/jcfp/sab-addons/ubuntu focal main" >> /etc/apt/sources.list.d/sabnzbd.list && \ echo "**** install packages ****" && \ - apt-get update && \ - apt-get install -y \ + apk add -U --update --no-cache --virtual=build-dependencies \ + build-base \ + gcc \ jq \ libffi-dev \ - libssl-dev \ - p7zip-full \ - par2-tbb \ + openssl-dev \ + python3-dev && \ + apk add -U --update --no-cache \ + curl \ + p7zip \ + par2cmdline \ python3 \ - python3-cryptography \ - python3-distutils \ - python3-pip \ - python3-setuptools \ + py3-pip && \ + apk add -U --update --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/v3.14/main \ unrar && \ if [ -z ${SABNZBD_VERSION+x} ]; then \ SABNZBD_VERSION=$(curl -s https://api.github.com/repos/sabnzbd/sabnzbd/releases \ - | jq -r 'first(.[]) | .tag_name'); \ + | jq -r 'first(.[] | select(.prerelease==true)) | .tag_name'); \ fi && \ mkdir -p /app/sabnzbd && \ curl -o \ @@ -49,30 +40,27 @@ RUN \ /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/ \ + python3 -m pip install --upgrade pip && \ + pip3 install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine/ \ + wheel \ apprise \ pynzb \ requests && \ - pip install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/ubuntu/ -r requirements.txt && \ + pip3 install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine/ -r requirements.txt && \ + pip3 cache purge && \ 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 && \ + apk del --purge \ + build-dependencies && \ rm -rf \ /tmp/* \ - /var/lib/apt/lists/* \ - /var/tmp/* \ $HOME/.cache -# add local files +# add local files COPY root/ / # ports and volumes -EXPOSE 8080 9090 +EXPOSE 8080 VOLUME /config diff --git a/Dockerfile.armhf b/Dockerfile.armhf index 9de50ce..4161ddd 100644 --- a/Dockerfile.armhf +++ b/Dockerfile.armhf @@ -1,46 +1,36 @@ -FROM ghcr.io/linuxserver/baseimage-ubuntu:arm32v7-focal +FROM ghcr.io/linuxserver/baseimage-alpine:arm32v7-3.15 # set version label ARG BUILD_DATE ARG VERSION ARG SABNZBD_VERSION LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" -LABEL maintainer="thelamer" +LABEL maintainer="thespad" -# environment settings -ARG DEBIAN_FRONTEND="noninteractive" +# environment settings 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 focal main" >> /etc/apt/sources.list.d/sabnzbd.list && \ - echo "deb-src http://ppa.launchpad.net/jcfp/ppa/ubuntu focal main" >> /etc/apt/sources.list.d/sabnzbd.list && \ - echo "deb http://ppa.launchpad.net/jcfp/sab-addons/ubuntu focal main" >> /etc/apt/sources.list.d/sabnzbd.list && \ - echo "deb-src http://ppa.launchpad.net/jcfp/sab-addons/ubuntu focal main" >> /etc/apt/sources.list.d/sabnzbd.list && \ echo "**** install packages ****" && \ - apt-get update && \ - apt-get install -y \ + apk add -U --update --no-cache --virtual=build-dependencies \ + build-base \ + gcc \ jq \ libffi-dev \ - libssl-dev \ - p7zip-full \ - par2-tbb \ + openssl-dev \ + python3-dev && \ + apk add -U --update --no-cache \ + curl \ + p7zip \ + par2cmdline \ python3 \ - python3-cryptography \ - python3-distutils \ - python3-pip \ - python3-setuptools \ - rustc \ + py3-pip && \ + apk add -U --update --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/v3.14/main \ unrar && \ if [ -z ${SABNZBD_VERSION+x} ]; then \ SABNZBD_VERSION=$(curl -s https://api.github.com/repos/sabnzbd/sabnzbd/releases \ - | jq -r 'first(.[]) | .tag_name'); \ + | jq -r 'first(.[] | select(.prerelease==true)) | .tag_name'); \ fi && \ mkdir -p /app/sabnzbd && \ curl -o \ @@ -50,32 +40,27 @@ RUN \ /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/ \ + python3 -m pip install --upgrade pip && \ + pip3 install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine/ \ + wheel \ apprise \ pynzb \ requests && \ - pip install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/ubuntu/ -r requirements.txt && \ + pip3 install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine/ -r requirements.txt && \ + pip3 cache purge && \ 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 && \ + apk del --purge \ + build-dependencies && \ rm -rf \ /tmp/* \ - /var/lib/apt/lists/* \ - /var/tmp/* \ - $HOME/.cache \ - $HOME/.cargo + $HOME/.cache -# add local files +# add local files COPY root/ / # ports and volumes -EXPOSE 8080 9090 +EXPOSE 8080 VOLUME /config diff --git a/jenkins-vars.yml b/jenkins-vars.yml index 87a6887..5b22f9f 100644 --- a/jenkins-vars.yml +++ b/jenkins-vars.yml @@ -3,7 +3,7 @@ # jenkins variables project_name: docker-sabnzbd external_type: na -custom_version_command: "curl -s https://api.github.com/repos/sabnzbd/sabnzbd/releases | jq -r 'first(.[]) | .tag_name'" +custom_version_command: "curl -s https://api.github.com/repos/sabnzbd/sabnzbd/releases | jq -r 'first(.[] | select(.prerelease==true)) | .tag_name'" release_type: prerelease release_tag: unstable ls_branch: unstable diff --git a/package_versions.txt b/package_versions.txt deleted file mode 100755 index 332c9f3..0000000 --- a/package_versions.txt +++ /dev/null @@ -1,172 +0,0 @@ -adduser3.118ubuntu2 -apt2.0.6 -apt-utils2.0.6 -base-files11ubuntu5.4 -base-passwd3.5.47 -bash5.0-6ubuntu1.1 -bsdutils1:2.34-0.1ubuntu9.1 -bzip21.0.8-2 -ca-certificates20210119~20.04.2 -coreutils8.30-3ubuntu2 -curl7.68.0-1ubuntu2.7 -dash0.5.10.2-6 -debconf1.5.73 -debianutils4.9.1 -diffutils1:3.7-3 -dirmngr2.2.19-3ubuntu2.1 -dpkg1.19.7ubuntu3 -e2fsprogs1.45.5-2ubuntu1 -fdisk2.34-0.1ubuntu9.1 -file1:5.38-4 -findutils4.7.0-1ubuntu1 -gcc-10-base10.3.0-1ubuntu1~20.04 -gnupg2.2.19-3ubuntu2.1 -gnupg-l10n2.2.19-3ubuntu2.1 -gnupg-utils2.2.19-3ubuntu2.1 -gpg2.2.19-3ubuntu2.1 -gpg-agent2.2.19-3ubuntu2.1 -gpgconf2.2.19-3ubuntu2.1 -gpgsm2.2.19-3ubuntu2.1 -gpgv2.2.19-3ubuntu2.1 -gpg-wks-client2.2.19-3ubuntu2.1 -gpg-wks-server2.2.19-3ubuntu2.1 -grep3.4-1 -gzip1.10-0ubuntu4 -hostname3.23 -init-system-helpers1.57 -jq1.6-1ubuntu0.20.04.1 -krb5-locales1.17-6ubuntu4.1 -libacl12.2.53-6 -libapt-pkg6.02.0.6 -libasn1-8-heimdal7.7.0+dfsg-1ubuntu1 -libassuan02.5.3-7ubuntu2 -libattr11:2.4.48-5 -libaudit11:2.8.5-2ubuntu6 -libaudit-common1:2.8.5-2ubuntu6 -libblkid12.34-0.1ubuntu9.1 -libbrotli11.0.7-6ubuntu0.1 -libbz2-1.01.0.8-2 -libc62.31-0ubuntu9.2 -libcap-ng00.7.9-2.1build1 -libc-bin2.31-0ubuntu9.2 -libcom-err21.45.5-2ubuntu1 -libcrypt11:4.4.10-10ubuntu4 -libcurl47.68.0-1ubuntu2.7 -libdb5.35.3.28+dfsg1-0.6ubuntu2 -libdebconfclient00.251ubuntu1 -libexpat12.2.9-1build1 -libext2fs21.45.5-2ubuntu1 -libfdisk12.34-0.1ubuntu9.1 -libffi73.3-4 -libgcc-s110.3.0-1ubuntu1~20.04 -libgcrypt201.8.5-5ubuntu1.1 -libgmp102:6.2.0+dfsg-4 -libgnutls303.6.13-2ubuntu1.6 -libgpg-error01.37-1 -libgssapi3-heimdal7.7.0+dfsg-1ubuntu1 -libgssapi-krb5-21.17-6ubuntu4.1 -libhcrypto4-heimdal7.7.0+dfsg-1ubuntu1 -libheimbase1-heimdal7.7.0+dfsg-1ubuntu1 -libheimntlm0-heimdal7.7.0+dfsg-1ubuntu1 -libhogweed53.5.1+really3.5.1-2ubuntu0.2 -libhx509-5-heimdal7.7.0+dfsg-1ubuntu1 -libidn2-02.2.0-2 -libjq11.6-1ubuntu0.20.04.1 -libk5crypto31.17-6ubuntu4.1 -libkeyutils11.6-6ubuntu1 -libkrb5-26-heimdal7.7.0+dfsg-1ubuntu1 -libkrb5-31.17-6ubuntu4.1 -libkrb5support01.17-6ubuntu4.1 -libksba81.3.5-2 -libldap-2.4-22.4.49+dfsg-2ubuntu1.8 -libldap-common2.4.49+dfsg-2ubuntu1.8 -liblz4-11.9.2-2ubuntu0.20.04.1 -liblzma55.2.4-1ubuntu1 -libmagic11:5.38-4 -libmagic-mgc1:5.38-4 -libmount12.34-0.1ubuntu9.1 -libmpdec22.4.2-3 -libncurses66.2-0ubuntu2 -libncursesw66.2-0ubuntu2 -libnettle73.5.1+really3.5.1-2ubuntu0.2 -libnghttp2-141.40.0-1build1 -libnpth01.6-1 -libonig56.9.4-1 -libp11-kit00.23.20-1ubuntu0.1 -libpam0g1.3.1-5ubuntu4.3 -libpam-modules1.3.1-5ubuntu4.3 -libpam-modules-bin1.3.1-5ubuntu4.3 -libpam-runtime1.3.1-5ubuntu4.3 -libpcre2-8-010.34-7 -libpcre32:8.39-12build1 -libprocps82:3.3.16-1ubuntu2.3 -libpsl50.21.0-1ubuntu1 -libpython3.8-minimal3.8.10-0ubuntu1~20.04.2 -libpython3.8-stdlib3.8.10-0ubuntu1~20.04.2 -libpython3-stdlib3.8.2-0ubuntu2 -libreadline88.0-4 -libroken18-heimdal7.7.0+dfsg-1ubuntu1 -librtmp12.4+20151223.gitfa8646d.1-2build1 -libsasl2-22.1.27+dfsg-2 -libsasl2-modules2.1.27+dfsg-2 -libsasl2-modules-db2.1.27+dfsg-2 -libseccomp22.5.1-1ubuntu1~20.04.2 -libselinux13.0-1build2 -libsemanage13.0-1build2 -libsemanage-common3.0-1build2 -libsepol13.0-1 -libsmartcols12.34-0.1ubuntu9.1 -libsqlite3-03.31.1-4ubuntu0.2 -libss21.45.5-2ubuntu1 -libssh-40.9.3-2ubuntu2.2 -libssl1.11.1.1f-1ubuntu2.10 -libstdc++610.3.0-1ubuntu1~20.04 -libsystemd0245.4-4ubuntu3.15 -libtasn1-64.16.0-2 -libtbb22020.1-2 -libtinfo66.2-0ubuntu2 -libudev1245.4-4ubuntu3.15 -libunistring20.9.10-2 -libuuid12.34-0.1ubuntu9.1 -libwind0-heimdal7.7.0+dfsg-1ubuntu1 -libzstd11.4.4+dfsg-3ubuntu0.1 -locales2.31-0ubuntu9.2 -login1:4.8.1-1ubuntu5.20.04.1 -logsave1.45.5-2ubuntu1 -lsb-base11.1.0ubuntu2 -mawk1.3.4.20200120-2 -mime-support3.64ubuntu1 -mount2.34-0.1ubuntu9.1 -ncurses-base6.2-0ubuntu2 -ncurses-bin6.2-0ubuntu2 -openssl1.1.1f-1ubuntu2.10 -p7zip16.02+dfsg-7build1 -p7zip-full16.02+dfsg-7build1 -par2-tbb0.4+20150503-0ubuntu1~jcfp2~focal -passwd1:4.8.1-1ubuntu5.20.04.1 -perl-base5.30.0-9ubuntu0.2 -pinentry-curses1.1.0-3build1 -procps2:3.3.16-1ubuntu2.3 -publicsuffix20200303.0012-1 -python33.8.2-0ubuntu2 -python3.83.8.10-0ubuntu1~20.04.2 -python3.8-minimal3.8.10-0ubuntu1~20.04.2 -python3-cffi-backend1.14.0-1build1 -python3-cryptography2.8-3ubuntu0.1 -python3-distutils3.8.10-0ubuntu1~20.04 -python3-lib2to33.8.10-0ubuntu1~20.04 -python3-minimal3.8.2-0ubuntu2 -python3-pkg-resources45.2.0-1 -python3-setuptools45.2.0-1 -python3-six1.14.0-2 -readline-common8.0-4 -sed4.7-1 -sensible-utils0.0.12+nmu1 -sysvinit-utils2.96-2.1ubuntu1 -tar1.30+dfsg-7ubuntu0.20.04.1 -tzdata2021e-0ubuntu0.20.04 -ubuntu-keyring2020.02.11.4 -unrar1:6.0.3-0ubuntu1~jcfp2~20.04 -util-linux2.34-0.1ubuntu9.1 -xz-utils5.2.4-1ubuntu1 -zlib1g1:1.2.11.dfsg-2ubuntu1.2 diff --git a/readme-vars.yml b/readme-vars.yml index ba631df..f24977c 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -18,7 +18,7 @@ available_architectures: development_versions: true development_versions_items: - { tag: "latest", desc: "Stable SABnzbd releases" } - - { tag: "unstable", desc: "Beta/Stable SABnzbd releases at edge" } + - { tag: "unstable", desc: "Unstable SABnzbd releases" } # container parameters common_param_env_vars_enabled: true @@ -33,7 +33,6 @@ param_volumes: param_usage_include_ports: true param_ports: - { external_port: "8080", internal_port: "8080", port_desc: "HTTP port for the WebUI." } - - { external_port: "9090", internal_port: "9090", port_desc: "HTTPS port for the WebUI." } param_device_map: false cap_add_param: false @@ -69,6 +68,7 @@ app_setup_block: | # changelog changelogs: + - { date: "25.01.22:", desc: "Rebase unstable branch to Alpine." } - { date: "08.08.21:", desc: "Bump to focal, dont enforce binding to ipv4 port 8080" } - { date: "24.07.21:", desc: "Add python3-setuptools." } - { date: "14.05.21:", desc: "Use linuxserver.io wheel index for pip packages." }