From 6cda39881068d0bd9e1a1ecca3dfc02f7a1f1c38 Mon Sep 17 00:00:00 2001 From: Michael Balsillie Date: Wed, 24 Aug 2022 11:15:00 +1200 Subject: [PATCH] rewrite for radarr --- Dockerfile | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0a864e1..a562acf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -ARG SONARR_VERSION=3.0.9.1549 +ARG RADARR_VERSION=4.1.0.6175 #FROM golang:bullseye AS builder #ARG SHOUTRRR_VERSION #RUN git clone -b ${SHOUTRRR_VERSION} --depth 1 https://github.com/containrrr/shoutrrr.git ./shoutrrr @@ -7,7 +7,7 @@ ARG SONARR_VERSION=3.0.9.1549 # go build -o /output ./shoutrrr FROM debian:10-slim -ARG SONARR_VERSION +ARG RADARR_VERSION WORKDIR /root RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections # Install tools to add extra repos @@ -21,37 +21,32 @@ RUN apt-get update && \ apt-transport-https \ tar \ dirmngr -# Add Mono repo key -RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF \ -# Add Mono repo - && echo "deb https://download.mono-project.com/repo/debian stable-buster main" | tee /etc/apt/sources.list.d/mono-official-stable.list \ # Mediainfo repo install - && curl -O https://mediaarea.net/repo/deb/repo-mediaarea_1.0-20_all.deb \ +RUN curl -O https://mediaarea.net/repo/deb/repo-mediaarea_1.0-20_all.deb \ && dpkg -i repo-mediaarea_1.0-20_all.deb \ && apt-get update # Install dependancies RUN apt-get -y install \ sqlite3 \ - mono-complete \ mediainfo \ && rm -rf /var/lib/apt/lists/* # Create the user that will run the service -RUN useradd -UM -u 1000 -d /app -s /bin/bash sonarr +RUN useradd -UM -u 1000 -d /app -s /bin/bash radarr # Download and extract the package RUN mkdir -p /app/bin \ && mkdir /config \ - && curl -fsSL "https://download.sonarr.tv/v3/main/${SONARR_VERSION}/Sonarr.main.${SONARR_VERSION}.linux.tar.gz" | tar xzf - -C /app/bin --strip-components=1 \ - && rm -rf /app/bin/Sonarr.Update \ - && echo -e "PackageVersion=${SONARR_VERSION}\nPackageAuthor=Michael\nUpdateMethod=Docker\nBranch=main" > "/app/package_info" \ + && curl -fsSL "https://radarr.servarr.com/v1/update/master/updatefile?version=${RADARR_VERSION}&os=linux&runtime=netcore&arch=x64" | tar xzf - -C /app/bin --strip-components=1 \ + && rm -rf /app/bin/Radarr.Update \ + && echo -e "PackageVersion=${RADARR_VERSION}\nPackageAuthor=Michael\nUpdateMethod=Docker\nBranch=master" > "/app/package_info" \ && chmod -R u=rwX,go=rX /app \ - && chown -R sonarr /app \ - && chown -R sonarr /config + && chown -R radarr /app \ + && chown -R radarr /config # Set startup conditions VOLUME /config -EXPOSE 8989 -USER sonarr +EXPOSE 7878 +USER radarr WORKDIR /app -ENTRYPOINT ["mono", "--debug", "/app/bin/Sonarr.exe"] +ENTRYPOINT ["/app/bin/Radarr"] CMD ["--nobrowser", "--data=/config"]