From 4accde66155384c3858a57b88ba1fa639b9c4119 Mon Sep 17 00:00:00 2001 From: Roxedus Date: Sun, 11 Jul 2021 23:39:54 +0200 Subject: [PATCH] Use runtime when checking for updates. --- .github/workflows/external_trigger.yml | 2 +- Dockerfile | 52 +++++++++++++------------- Dockerfile.aarch64 | 52 +++++++++++++------------- Dockerfile.armhf | 52 +++++++++++++------------- Jenkinsfile | 2 +- README.md | 19 +++++++--- jenkins-vars.yml | 3 +- readme-vars.yml | 14 +++++-- root/etc/cont-init.d/30-config | 2 +- root/etc/services.d/radarr/run | 8 ++-- 10 files changed, 110 insertions(+), 96 deletions(-) diff --git a/.github/workflows/external_trigger.yml b/.github/workflows/external_trigger.yml index f5dcb44..7566887 100644 --- a/.github/workflows/external_trigger.yml +++ b/.github/workflows/external_trigger.yml @@ -18,7 +18,7 @@ jobs: fi echo "**** External trigger running off of develop branch. To disable this trigger, set a Github secret named \"PAUSE_EXTERNAL_TRIGGER_RADARR_DEVELOP\". ****" echo "**** Retrieving external version ****" - EXT_RELEASE=$(curl -sL https://radarr.servarr.com/v1/update/develop/changes?os=linux | jq -r '.[0].version') + EXT_RELEASE=$(curl -sL https://radarr.servarr.com/v1/update/develop/changes?runtime=netcore%26os=linux | jq -r '.[0].version') if [ -z "${EXT_RELEASE}" ] || [ "${EXT_RELEASE}" == "null" ]; then echo "**** Can't retrieve external version, exiting ****" FAILURE_REASON="Can't retrieve external version for radarr branch develop" diff --git a/Dockerfile b/Dockerfile index 155e1a5..f3f5326 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,32 +13,32 @@ ARG RADARR_BRANCH="develop" ENV XDG_CONFIG_HOME="/config/xdg" RUN \ - echo "**** install packages ****" && \ - apt-get update && \ - apt-get install --no-install-recommends -y \ - jq \ - libicu66 \ - libmediainfo0v5 \ - sqlite3 && \ - echo "**** install radarr ****" && \ - mkdir -p /app/radarr/bin && \ - if [ -z ${RADARR_RELEASE+x} ]; then \ - RADARR_RELEASE=$(curl -sL "https://radarr.servarr.com/v1/update/${RADARR_BRANCH}/changes?os=linux" \ - | jq -r '.[0].version'); \ - fi && \ - curl -o \ - /tmp/radarr.tar.gz -L \ - "https://radarr.servarr.com/v1/update/${RADARR_BRANCH}/updatefile?version=${RADARR_RELEASE}&os=linux&runtime=netcore&arch=x64" && \ - tar ixzf \ - /tmp/radarr.tar.gz -C \ - /app/radarr/bin --strip-components=1 && \ - echo "UpdateMethod=docker\nBranch=${RADARR_BRANCH}\nPackageVersion=${VERSION}\nPackageAuthor=linuxserver.io" > /app/radarr/package_info && \ - echo "**** cleanup ****" && \ - rm -rf \ - /app/radarr/bin/Radarr.Update \ - /tmp/* \ - /var/lib/apt/lists/* \ - /var/tmp/* + echo "**** install packages ****" && \ + apt-get update && \ + apt-get install --no-install-recommends -y \ + jq \ + libicu66 \ + libmediainfo0v5 \ + sqlite3 && \ + echo "**** install radarr ****" && \ + mkdir -p /app/radarr/bin && \ + if [ -z ${RADARR_RELEASE+x} ]; then \ + RADARR_RELEASE=$(curl -sL "https://radarr.servarr.com/v1/update/${RADARR_BRANCH}/changes?runtime=netcore&os=linux" \ + | jq -r '.[0].version'); \ + fi && \ + curl -o \ + /tmp/radarr.tar.gz -L \ + "https://radarr.servarr.com/v1/update/${RADARR_BRANCH}/updatefile?version=${RADARR_RELEASE}&os=linux&runtime=netcore&arch=x64" && \ + tar ixzf \ + /tmp/radarr.tar.gz -C \ + /app/radarr/bin --strip-components=1 && \ + echo "UpdateMethod=docker\nBranch=${RADARR_BRANCH}\nPackageVersion=${VERSION}\nPackageAuthor=linuxserver.io" > /app/radarr/package_info && \ + echo "**** cleanup ****" && \ + rm -rf \ + /app/radarr/bin/Radarr.Update \ + /tmp/* \ + /var/lib/apt/lists/* \ + /var/tmp/* # copy local files COPY root/ / diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index a46a675..8762d19 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -13,32 +13,32 @@ ARG RADARR_BRANCH="develop" ENV XDG_CONFIG_HOME="/config/xdg" RUN \ - echo "**** install packages ****" && \ - apt-get update && \ - apt-get install --no-install-recommends -y \ - jq \ - libicu66 \ - libmediainfo0v5 \ - sqlite3 && \ - echo "**** install radarr ****" && \ - mkdir -p /app/radarr/bin && \ - if [ -z ${RADARR_RELEASE+x} ]; then \ - RADARR_RELEASE=$(curl -sL "https://radarr.servarr.com/v1/update/${RADARR_BRANCH}/changes?os=linux" \ - | jq -r '.[0].version'); \ - fi && \ - curl -o \ - /tmp/radarr.tar.gz -L \ - "https://radarr.servarr.com/v1/update/${RADARR_BRANCH}/updatefile?version=${RADARR_RELEASE}&os=linux&runtime=netcore&arch=arm64" && \ - tar ixzf \ - /tmp/radarr.tar.gz -C \ - /app/radarr/bin --strip-components=1 && \ - echo "UpdateMethod=docker\nBranch=${RADARR_BRANCH}\nPackageVersion=${VERSION}\nPackageAuthor=linuxserver.io" > /app/radarr/package_info && \ - echo "**** cleanup ****" && \ - rm -rf \ - /app/radarr/bin/Radarr.Update \ - /tmp/* \ - /var/lib/apt/lists/* \ - /var/tmp/* + echo "**** install packages ****" && \ + apt-get update && \ + apt-get install --no-install-recommends -y \ + jq \ + libicu66 \ + libmediainfo0v5 \ + sqlite3 && \ + echo "**** install radarr ****" && \ + mkdir -p /app/radarr/bin && \ + if [ -z ${RADARR_RELEASE+x} ]; then \ + RADARR_RELEASE=$(curl -sL "https://radarr.servarr.com/v1/update/${RADARR_BRANCH}/changes?runtime=netcore&os=linux " \ + | jq -r '.[0].version'); \ + fi && \ + curl -o \ + /tmp/radarr.tar.gz -L \ + "https://radarr.servarr.com/v1/update/${RADARR_BRANCH}/updatefile?version=${RADARR_RELEASE}&os=linux&runtime=netcore&arch=arm64" && \ + tar ixzf \ + /tmp/radarr.tar.gz -C \ + /app/radarr/bin --strip-components=1 && \ + echo "UpdateMethod=docker\nBranch=${RADARR_BRANCH}\nPackageVersion=${VERSION}\nPackageAuthor=linuxserver.io" > /app/radarr/package_info && \ + echo "**** cleanup ****" && \ + rm -rf \ + /app/radarr/bin/Radarr.Update \ + /tmp/* \ + /var/lib/apt/lists/* \ + /var/tmp/* # copy local files COPY root/ / diff --git a/Dockerfile.armhf b/Dockerfile.armhf index d677b34..aed063c 100644 --- a/Dockerfile.armhf +++ b/Dockerfile.armhf @@ -13,32 +13,32 @@ ARG RADARR_BRANCH="develop" ENV XDG_CONFIG_HOME="/config/xdg" RUN \ - echo "**** install packages ****" && \ - apt-get update && \ - apt-get install --no-install-recommends -y \ - jq \ - libicu66 \ - libmediainfo0v5 \ - sqlite3 && \ - echo "**** install radarr ****" && \ - mkdir -p /app/radarr/bin && \ - if [ -z ${RADARR_RELEASE+x} ]; then \ - RADARR_RELEASE=$(curl -sL "https://radarr.servarr.com/v1/update/${RADARR_BRANCH}/changes?os=linux" \ - | jq -r '.[0].version'); \ - fi && \ - curl -o \ - /tmp/radarr.tar.gz -L \ - "https://radarr.servarr.com/v1/update/${RADARR_BRANCH}/updatefile?version=${RADARR_RELEASE}&os=linux&runtime=netcore&arch=arm" && \ - tar ixzf \ - /tmp/radarr.tar.gz -C \ - /app/radarr/bin --strip-components=1 && \ - echo "**** cleanup ****" && \ - echo "UpdateMethod=docker\nBranch=${RADARR_BRANCH}\nPackageVersion=${VERSION}\nPackageAuthor=linuxserver.io" > /app/radarr/package_info && \ - rm -rf \ - /app/radarr/bin/Radarr.Update \ - /tmp/* \ - /var/lib/apt/lists/* \ - /var/tmp/* + echo "**** install packages ****" && \ + apt-get update && \ + apt-get install --no-install-recommends -y \ + jq \ + libicu66 \ + libmediainfo0v5 \ + sqlite3 && \ + echo "**** install radarr ****" && \ + mkdir -p /app/radarr/bin && \ + if [ -z ${RADARR_RELEASE+x} ]; then \ + RADARR_RELEASE=$(curl -sL "https://radarr.servarr.com/v1/update/${RADARR_BRANCH}/changes?runtime=netcore&os=linux " \ + | jq -r '.[0].version'); \ + fi && \ + curl -o \ + /tmp/radarr.tar.gz -L \ + "https://radarr.servarr.com/v1/update/${RADARR_BRANCH}/updatefile?version=${RADARR_RELEASE}&os=linux&runtime=netcore&arch=arm" && \ + tar ixzf \ + /tmp/radarr.tar.gz -C \ + /app/radarr/bin --strip-components=1 && \ + echo "**** cleanup ****" && \ + echo "UpdateMethod=docker\nBranch=${RADARR_BRANCH}\nPackageVersion=${VERSION}\nPackageAuthor=linuxserver.io" > /app/radarr/package_info && \ + rm -rf \ + /app/radarr/bin/Radarr.Update \ + /tmp/* \ + /var/lib/apt/lists/* \ + /var/tmp/* # copy local files COPY root/ / diff --git a/Jenkinsfile b/Jenkinsfile index b2aa482..06b41c3 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -103,7 +103,7 @@ pipeline { steps{ script{ env.EXT_RELEASE = sh( - script: ''' curl -sL https://radarr.servarr.com/v1/update/develop/changes?os=linux | jq -r '.[0].version' ''', + script: ''' curl -sL https://radarr.servarr.com/v1/update/develop/changes?runtime=netcore%26os=linux | jq -r '.[0].version' ''', returnStdout: true).trim() env.RELEASE_LINK = 'custom_command' } diff --git a/README.md b/README.md index 435d17d..765e433 100644 --- a/README.md +++ b/README.md @@ -70,9 +70,15 @@ This image provides various versions that are available via tags. `latest` tag u Access the webui at `:7878`, for more information check out [Radarr](https://github.com/Radarr/Radarr). -**Special Note**: Following our current folder structure will result in an inability to hardlink from your downloads to your movies folder because they are on seperate volumes. To support hardlinking, ensure that the movies and downloads data are on a single volume. For example, if you have `/mnt/storage/Movies` and `/mnt/storage/downloads/completed/Movies`, you would want something like `/mnt/storage:/media` for your volume. Then you can hardlink from `/media/downloads/completed` to `/media/Movies`. +### Media folders -Another item to keep in mind, is that within Radarr itself, you should map your download client folder to your radarr folder. Navigate to **Settings -> Download Client -> Advanced Settings -> Remote Path Mappings**. Add a new mapping, and set: the Host as the same entry of the Host in your download client (for example its IP address), the Remote Path as `/downloads/Movies` (relative to the internal container path), and Local Path as `/media/downloads/completed/Movies`, assuming you have folders to separate your downloaded data types. +We have set `/movies` and `/downloads` as ***optional paths***, this is because it is the easiest way to get started. While easy to use, it has some drawbacks. Mainly losing the ability to hardlink (TL;DR a way for a file to exist in multiple places on the same file system while only consuming one file worth of space), or atomic move (TL;DR instant file moves, rather than copy+delete) files while processing content. + +Use the optional paths if you dont understand, or dont want hardlinks/atomic moves. + +The folks over at servarr.com wrote a good [write-up](https://wiki.servarr.com/docker-guide#consistent-and-well-planned-paths) on how to get started with this. + +# changelog ## Usage @@ -93,8 +99,8 @@ services: - TZ=Europe/London volumes: - /path/to/data:/config - - /path/to/movies:/movies - - /path/to/downloadclient-downloads:/downloads + - /path/to/movies:/movies #optional + - /path/to/downloadclient-downloads:/downloads #optional ports: - 7878:7878 restart: unless-stopped @@ -110,8 +116,8 @@ docker run -d \ -e TZ=Europe/London \ -p 7878:7878 \ -v /path/to/data:/config \ - -v /path/to/movies:/movies \ - -v /path/to/downloadclient-downloads:/downloads \ + -v /path/to/movies:/movies `#optional` \ + -v /path/to/downloadclient-downloads:/downloads `#optional` \ --restart unless-stopped \ ghcr.io/linuxserver/radarr ``` @@ -239,6 +245,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64 ## Versions +* **11.07.21:** - Make the paths clearer to the user * **17.01.21:** - Deprecate `UMASK_SET` in favor of UMASK in baseimage, see above for more information. * **11.30.20:** - Publish `develop` tag. * **11.28.20:** - Switch to v3 .NET CORE builds (no more mono, `5.14` tag is deprecated). Rebase to Focal (for issues on arm32v7, [see here](https://docs.linuxserver.io/faq#my-host-is-incompatible-with-images-based-on-ubuntu-focal)). diff --git a/jenkins-vars.yml b/jenkins-vars.yml index 546019a..97bfe93 100644 --- a/jenkins-vars.yml +++ b/jenkins-vars.yml @@ -1,9 +1,8 @@ --- - # jenkins variables project_name: docker-radarr external_type: na -custom_version_command: curl -sL https://radarr.servarr.com/v1/update/develop/changes?os=linux | jq -r '.[0].version' +custom_version_command: curl -sL https://radarr.servarr.com/v1/update/develop/changes?runtime=netcore%26os=linux | jq -r '.[0].version' release_type: prerelease release_tag: develop ls_branch: develop diff --git a/readme-vars.yml b/readme-vars.yml index 1c1f932..50a2a8f 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -26,6 +26,9 @@ param_container_name: "{{ project_name }}" param_usage_include_vols: true param_volumes: - { vol_path: "/config", vol_host_path: "/path/to/data", desc: "Database and Radarr configs" } + +opt_param_usage_include_vols: true +opt_param_volumes: - { vol_path: "/movies", vol_host_path: "/path/to/movies", desc: "Location of Movie library on disk (See note in Application setup)" } - { vol_path: "/downloads", vol_host_path: "/path/to/downloadclient-downloads", desc: "Location of download managers output directory (See note in Application setup)" } @@ -43,12 +46,17 @@ app_setup_block_enabled: true app_setup_block: | Access the webui at `:7878`, for more information check out [Radarr](https://github.com/Radarr/Radarr). - **Special Note**: Following our current folder structure will result in an inability to hardlink from your downloads to your movies folder because they are on seperate volumes. To support hardlinking, ensure that the movies and downloads data are on a single volume. For example, if you have `/mnt/storage/Movies` and `/mnt/storage/downloads/completed/Movies`, you would want something like `/mnt/storage:/media` for your volume. Then you can hardlink from `/media/downloads/completed` to `/media/Movies`. + ### Media folders - Another item to keep in mind, is that within Radarr itself, you should map your download client folder to your radarr folder. Navigate to **Settings -> Download Client -> Advanced Settings -> Remote Path Mappings**. Add a new mapping, and set: the Host as the same entry of the Host in your download client (for example its IP address), the Remote Path as `/downloads/Movies` (relative to the internal container path), and Local Path as `/media/downloads/completed/Movies`, assuming you have folders to separate your downloaded data types. + We have set `/movies` and `/downloads` as ***optional paths***, this is because it is the easiest way to get started. While easy to use, it has some drawbacks. Mainly losing the ability to hardlink (TL;DR a way for a file to exist in multiple places on the same file system while only consuming one file worth of space), or atomic move (TL;DR instant file moves, rather than copy+delete) files while processing content. + + Use the optional paths if you dont understand, or dont want hardlinks/atomic moves. + + The folks over at servarr.com wrote a good [write-up](https://wiki.servarr.com/docker-guide#consistent-and-well-planned-paths) on how to get started with this. -# changelog + # changelog changelogs: + - { date: "11.07.21:", desc: "Make the paths clearer to the user" } - { date: "17.01.21:", desc: "Deprecate `UMASK_SET` in favor of UMASK in baseimage, see above for more information." } - { date: "11.30.20:", desc: "Publish `develop` tag." } - { date: "11.28.20:", desc: "Switch to v3 .NET CORE builds (no more mono, `5.14` tag is deprecated). Rebase to Focal (for issues on arm32v7, [see here](https://docs.linuxserver.io/faq#my-host-is-incompatible-with-images-based-on-ubuntu-focal))." } diff --git a/root/etc/cont-init.d/30-config b/root/etc/cont-init.d/30-config index 4a919c2..aa3208d 100644 --- a/root/etc/cont-init.d/30-config +++ b/root/etc/cont-init.d/30-config @@ -2,4 +2,4 @@ # permissions chown -R abc:abc \ - /config + /config diff --git a/root/etc/services.d/radarr/run b/root/etc/services.d/radarr/run index a2a313a..e638d31 100644 --- a/root/etc/services.d/radarr/run +++ b/root/etc/services.d/radarr/run @@ -1,12 +1,12 @@ #!/usr/bin/with-contenv bash if [ -n "${UMASK_SET}" ] && [ -z "${UMASK}" ]; then - echo -e "You are using a legacy method of defining umask\nplease update your environment variable from UMASK_SET to UMASK\nto keep the functionality after July 2021" - umask ${UMASK_SET} + echo -e "You are using a legacy method of defining umask\nplease update your environment variable from UMASK_SET to UMASK\nto keep the functionality after July 2021" + umask ${UMASK_SET} fi cd /app/radarr/bin || exit exec \ - s6-setuidgid abc /app/radarr/bin/Radarr \ - -nobrowser -data=/config \ No newline at end of file + s6-setuidgid abc /app/radarr/bin/Radarr \ + -nobrowser -data=/config