From 1bde042dc4fa3e91d52b0c0c2f9b7365d1660154 Mon Sep 17 00:00:00 2001 From: Hadrien Patte Date: Thu, 28 Mar 2024 00:31:17 +0100 Subject: [PATCH] Add radarr image --- images/radarr/Dockerfile | 34 ++++++++++++++++++++++++++++++++++ images/radarr/version.sh | 4 ++++ 2 files changed, 38 insertions(+) create mode 100644 images/radarr/Dockerfile create mode 100755 images/radarr/version.sh diff --git a/images/radarr/Dockerfile b/images/radarr/Dockerfile new file mode 100644 index 0000000..cf9436b --- /dev/null +++ b/images/radarr/Dockerfile @@ -0,0 +1,34 @@ +FROM golang:latest as builder + +ARG TARGETARCH +ARG VERSION + +# Install chisel and build rootfs with radarr dependencies +RUN \ + go install github.com/canonical/chisel/cmd/chisel@latest \ + && mkdir /rootfs \ + && chisel cut \ + --release ubuntu-24.04 \ + --root /rootfs \ + base-files_base \ + base-files_release-info \ + base-passwd_data \ + ca-certificates_data \ + dotnet-runtime-8.0_libs \ + libsqlite3-0_libs + +# Download radarr +RUN \ + case "${TARGETARCH}" in \ + 'amd64') export ARCH='x64' ;; \ + 'arm64') export ARCH='arm64' ;; \ + esac \ + && curl -L "https://github.com/Radarr/Radarr/releases/download/v${VERSION}/Radarr.master.${VERSION}.linux-core-${ARCH}.tar.gz" \ + | tar xzf - -C / \ + && rm -rf /Radarr/Radarr.Update + +FROM scratch +COPY --from=builder /rootfs / +COPY --from=builder /Radarr /Radarr + +ENTRYPOINT ["/Radarr/Radarr", "--nobrowser", "--data=/config"] diff --git a/images/radarr/version.sh b/images/radarr/version.sh new file mode 100755 index 0000000..9de2bdb --- /dev/null +++ b/images/radarr/version.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash +set -euo pipefail + +curl -s "https://api.github.com/repos/Radarr/Radarr/releases/latest" | jq -r '.name'