From 057f2fbc10219f387fecf30de2f8fb592f64b2fd Mon Sep 17 00:00:00 2001 From: TheSpad Date: Mon, 21 Feb 2022 20:57:13 +0000 Subject: [PATCH] Build unrar from source --- Dockerfile | 17 ++++++++++++++--- Dockerfile.aarch64 | 17 ++++++++++++++--- Dockerfile.armhf | 17 ++++++++++++++--- readme-vars.yml | 1 + 4 files changed, 43 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3f7acd4..ab39748 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,7 @@ FROM ghcr.io/linuxserver/baseimage-alpine:3.15 # set version label +ARG UNRAR_VERSION=6.1.4 ARG BUILD_DATE ARG VERSION ARG SABNZBD_VERSION @@ -26,8 +27,18 @@ RUN \ par2cmdline \ python3 \ py3-pip && \ - apk add -U --update --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/v3.14/main \ - unrar && \ + echo "**** install unrar from source ****" && \ + mkdir /tmp/unrar && \ + curl -o \ + /tmp/unrar.tar.gz -L \ + "https://www.rarlab.com/rar/unrarsrc-${UNRAR_VERSION}.tar.gz" && \ + tar xf \ + /tmp/unrar.tar.gz -C \ + /tmp/unrar --strip-components=1 && \ + cd /tmp/unrar && \ + make && \ + install -v -m755 unrar /usr/local/bin && \ + echo "**** install sabnzbd ****" && \ if [ -z ${SABNZBD_VERSION+x} ]; then \ SABNZBD_VERSION=$(curl -s https://api.github.com/repos/sabnzbd/sabnzbd/releases \ | jq -r 'first(.[]) | .tag_name'); \ @@ -47,7 +58,6 @@ RUN \ pynzb \ requests && \ pip3 install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.15/ -r requirements.txt && \ - pip3 cache purge && \ echo "**** cleanup ****" && \ ln -s \ /usr/bin/python3 \ @@ -63,4 +73,5 @@ COPY root/ / # ports and volumes EXPOSE 8080 + VOLUME /config diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 2ff65ed..28dd52a 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -1,6 +1,7 @@ FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.15 # set version label +ARG UNRAR_VERSION=6.1.4 ARG BUILD_DATE ARG VERSION ARG SABNZBD_VERSION @@ -26,8 +27,18 @@ RUN \ par2cmdline \ python3 \ py3-pip && \ - apk add -U --update --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/v3.14/main \ - unrar && \ + echo "**** install unrar from source ****" && \ + mkdir /tmp/unrar && \ + curl -o \ + /tmp/unrar.tar.gz -L \ + "https://www.rarlab.com/rar/unrarsrc-${UNRAR_VERSION}.tar.gz" && \ + tar xf \ + /tmp/unrar.tar.gz -C \ + /tmp/unrar --strip-components=1 && \ + cd /tmp/unrar && \ + make && \ + install -v -m755 unrar /usr/local/bin && \ + echo "**** install sabnzbd ****" && \ if [ -z ${SABNZBD_VERSION+x} ]; then \ SABNZBD_VERSION=$(curl -s https://api.github.com/repos/sabnzbd/sabnzbd/releases \ | jq -r 'first(.[]) | .tag_name'); \ @@ -47,7 +58,6 @@ RUN \ pynzb \ requests && \ pip3 install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.15/ -r requirements.txt && \ - pip3 cache purge && \ echo "**** cleanup ****" && \ ln -s \ /usr/bin/python3 \ @@ -63,4 +73,5 @@ COPY root/ / # ports and volumes EXPOSE 8080 + VOLUME /config diff --git a/Dockerfile.armhf b/Dockerfile.armhf index c6f4e75..51b0121 100644 --- a/Dockerfile.armhf +++ b/Dockerfile.armhf @@ -1,6 +1,7 @@ FROM ghcr.io/linuxserver/baseimage-alpine:arm32v7-3.15 # set version label +ARG UNRAR_VERSION=6.1.4 ARG BUILD_DATE ARG VERSION ARG SABNZBD_VERSION @@ -26,8 +27,18 @@ RUN \ par2cmdline \ python3 \ py3-pip && \ - apk add -U --update --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/v3.14/main \ - unrar && \ + echo "**** install unrar from source ****" && \ + mkdir /tmp/unrar && \ + curl -o \ + /tmp/unrar.tar.gz -L \ + "https://www.rarlab.com/rar/unrarsrc-${UNRAR_VERSION}.tar.gz" && \ + tar xf \ + /tmp/unrar.tar.gz -C \ + /tmp/unrar --strip-components=1 && \ + cd /tmp/unrar && \ + make && \ + install -v -m755 unrar /usr/local/bin && \ + echo "**** install sabnzbd ****" && \ if [ -z ${SABNZBD_VERSION+x} ]; then \ SABNZBD_VERSION=$(curl -s https://api.github.com/repos/sabnzbd/sabnzbd/releases \ | jq -r 'first(.[]) | .tag_name'); \ @@ -47,7 +58,6 @@ RUN \ pynzb \ requests && \ pip3 install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.15/ -r requirements.txt && \ - pip3 cache purge && \ echo "**** cleanup ****" && \ ln -s \ /usr/bin/python3 \ @@ -63,4 +73,5 @@ COPY root/ / # ports and volumes EXPOSE 8080 + VOLUME /config diff --git a/readme-vars.yml b/readme-vars.yml index f24977c..8362b6a 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -68,6 +68,7 @@ app_setup_block: | # changelog changelogs: + - { date: "22.02.22:", desc: "Build unrar from source." } - { 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." }