From 882d7934e59d332b4fa2d638e485acd5e9cf8ef8 Mon Sep 17 00:00:00 2001 From: Michael Balsillie Date: Tue, 23 Aug 2022 23:33:14 +1200 Subject: [PATCH] Added Dockerfile --- Dockerfile | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 0 2 files changed, 58 insertions(+) create mode 100644 Dockerfile create mode 100644 README.md diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..8e83bab --- /dev/null +++ b/Dockerfile @@ -0,0 +1,58 @@ +ARG SONARR_VERSION=3.0.9.1549 +#FROM golang:bullseye AS builder +#ARG SHOUTRRR_VERSION +#RUN git clone -b ${SHOUTRRR_VERSION} --depth 1 https://github.com/containrrr/shoutrrr.git ./shoutrrr +#RUN cd ./shoutrrr && \ +# mkdir /output && \ +# go build -o /output ./shoutrrr + +FROM debian:10-slim +ARG SONARR_VERSION +WORKDIR /root +RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections +# Install tools to add extra repos +RUN apt-get update && \ + apt-get -y --no-install-recommends install \ + bash \ + curl \ + jq \ + ca-certificates \ + gnupg \ + 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" | sudo 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 \ + && 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 +# 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" && \ + && chmod -R u=rwX,go=rX /app + && chown -R sonarr /app \ + && chown -R sonarr /config \ +# Set startup conditions +VOLUME /config +EXPOSE 8989 +USER sonarr +WORKDIR /app +ENTRYPOINT ["mono", "/app/bin/Sonarr.exe"] +CMD ["--nobrowser", "--data=/config"] + + + diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29