From 8e47167638ebbbd46613341214831b6db6b2971f Mon Sep 17 00:00:00 2001 From: Jess Frazelle Date: Sat, 14 Jul 2018 17:53:05 -0400 Subject: [PATCH] add sonarr and radarr Signed-off-by: Jess Frazelle --- latest-versions.sh | 1 + radarr/Dockerfile | 35 +++++++++++++++++++++++++++++++++++ radarr/entrypoint.sh | 15 +++++++++++++++ sonarr/Dockerfile | 34 ++++++++++++++++++++++++++++++++++ sonarr/entrypoint.sh | 15 +++++++++++++++ 5 files changed, 100 insertions(+) create mode 100644 radarr/Dockerfile create mode 100755 radarr/entrypoint.sh create mode 100644 sonarr/Dockerfile create mode 100755 sonarr/entrypoint.sh diff --git a/latest-versions.sh b/latest-versions.sh index ef92016..c91a1e4 100755 --- a/latest-versions.sh +++ b/latest-versions.sh @@ -113,6 +113,7 @@ bitly/oauth2_proxy Tautulli/Tautulli perkeep/perkeep powershell/powershell +Radarr/Radarr cesanta/docker_auth ricochet-im/ricochet reverse-shell/routersploit diff --git a/radarr/Dockerfile b/radarr/Dockerfile new file mode 100644 index 0000000..f84fe4c --- /dev/null +++ b/radarr/Dockerfile @@ -0,0 +1,35 @@ +FROM alpine:latest +LABEL maintainer "Jessie Frazelle " + +ENV LANG "en_US.UTF-8" +ENV LANGUAGE "en_US.UTF-8" +ENV TERM "xterm" + +RUN apk add --no-cache \ + bash \ + ca-certificates \ + libmediainfo \ + mono \ + tar \ + --repository https://dl-4.alpinelinux.org/alpine/edge/testing + +# https://github.com/Radarr/Radarr/releases +ENV RADARR_VERSION 0.2.0.1120 +RUN mkdir -p /opt/radarr \ + && wget "https://github.com/Radarr/Radarr/releases/download/v${RADARR_VERSION}/Radarr.develop.${RADARR_VERSION}.linux.tar.gz" -O /tmp/radarr.tar.gz \ + && tar -xzvf /tmp/radarr.tar.gz -C /opt/radarr --strip-components 1 \ + && rm -rf /tmp/radarr.tar.gz + +COPY entrypoint.sh /usr/local/bin/entrypoint.sh + +# Create user and change ownership +RUN addgroup -g 666 -S radarr \ + && adduser -u 666 -SHG radarr radarr \ + && mkdir -p /config \ + && chown -R radarr:radarr /opt/radarr /config + +WORKDIR /opt/radarr + +USER radarr + +ENTRYPOINT ["entrypoint.sh"] diff --git a/radarr/entrypoint.sh b/radarr/entrypoint.sh new file mode 100755 index 0000000..70d9f52 --- /dev/null +++ b/radarr/entrypoint.sh @@ -0,0 +1,15 @@ +#!/bin/bash +set -e +set -o pipefail + +handle_signal() { + PID=$! + echo "Received signal. PID is ${PID}" + kill -s SIGHUP $PID +} + +trap "handle_signal" SIGINT SIGTERM SIGHUP + +echo "Starting radarr..." +exec mono --debug /opt/radarr/Radarr.exe --no-browser -data=/config & wait +echo "Stopping radarr..." diff --git a/sonarr/Dockerfile b/sonarr/Dockerfile new file mode 100644 index 0000000..7a5efc9 --- /dev/null +++ b/sonarr/Dockerfile @@ -0,0 +1,34 @@ +FROM alpine:latest +LABEL maintainer "Jessie Frazelle " + +ENV LANG "en_US.UTF-8" +ENV LANGUAGE "en_US.UTF-8" +ENV TERM "xterm" + +RUN apk add --no-cache \ + bash \ + ca-certificates \ + libmediainfo \ + mono \ + tar \ + --repository https://dl-4.alpinelinux.org/alpine/edge/testing + +ENV SONARR_VERSION "develop" +RUN mkdir -p /opt/sonarr \ + && wget "http://update.sonarr.tv/v2/${SONARR_VERSION}/mono/NzbDrone.${SONARR_VERSION}.tar.gz" -O /tmp/sonarr.tar.gz \ + && tar -xzvf /tmp/sonarr.tar.gz -C /opt/sonarr --strip-components 1 \ + && rm -rf /tmp/sonarr.tar.gz + +COPY entrypoint.sh /usr/local/bin/entrypoint.sh + +# Create user and change ownership +RUN addgroup -g 666 -S sonarr \ + && adduser -u 666 -SHG sonarr sonarr \ + && mkdir -p /config \ + && chown -R sonarr:sonarr /opt/sonarr /config + +WORKDIR /opt/sonarr + +USER sonarr + +ENTRYPOINT ["entrypoint.sh"] diff --git a/sonarr/entrypoint.sh b/sonarr/entrypoint.sh new file mode 100755 index 0000000..60997a0 --- /dev/null +++ b/sonarr/entrypoint.sh @@ -0,0 +1,15 @@ +#!/bin/bash +set -e +set -o pipefail + +handle_signal() { + PID=$! + echo "Received signal. PID is ${PID}" + kill -s SIGHUP $PID +} + +trap "handle_signal" SIGINT SIGTERM SIGHUP + +echo "Starting sonarr..." +exec mono --debug /opt/sonarr/NzbDrone.exe --no-browser -data=/config & wait +echo "Stopping sonarr..."