2023-03-20 22:08:43 -04:00
|
|
|
ARG SONARR_VERSION=4.0.0.401
|
2022-08-23 07:33:14 -04:00
|
|
|
#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
|
|
|
|
|
2023-03-20 22:08:43 -04:00
|
|
|
FROM debian:buster-slim
|
2022-08-23 07:33:14 -04:00
|
|
|
ARG SONARR_VERSION
|
|
|
|
WORKDIR /root
|
|
|
|
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
|
2023-03-20 22:08:43 -04:00
|
|
|
|
2022-08-23 07:33:14 -04:00
|
|
|
# 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
|
2023-03-20 22:08:43 -04:00
|
|
|
|
2022-08-23 07:33:14 -04:00
|
|
|
# Add Mono repo key
|
|
|
|
# Add Mono repo
|
|
|
|
# Mediainfo repo install
|
2023-03-20 22:08:43 -04:00
|
|
|
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF && \
|
|
|
|
echo "deb https://download.mono-project.com/repo/debian stable-buster main" | tee /etc/apt/sources.list.d/mono-official-stable.list && \
|
|
|
|
curl -O https://mediaarea.net/repo/deb/repo-mediaarea_1.0-21_all.deb && \
|
|
|
|
dpkg -i repo-mediaarea_1.0-21_all.deb && \
|
|
|
|
apt-get update
|
|
|
|
|
2022-08-23 07:33:14 -04:00
|
|
|
# Install dependancies
|
|
|
|
RUN apt-get -y install \
|
|
|
|
sqlite3 \
|
|
|
|
mono-complete \
|
2023-03-20 22:08:43 -04:00
|
|
|
mediainfo && \
|
|
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
|
2022-08-23 07:33:14 -04:00
|
|
|
# Create the user that will run the service
|
2023-03-20 22:08:43 -04:00
|
|
|
# RUN useradd -UM -u 1000 -d /app -s /bin/bash sonarr
|
2022-08-23 07:33:14 -04:00
|
|
|
# Download and extract the package
|
2023-03-20 22:08:43 -04:00
|
|
|
RUN mkdir -p /app/bin && \
|
|
|
|
mkdir /config && \
|
|
|
|
curl -fsSL "https://services.sonarr.tv/v1/download/develop/latest?version=4&os=linux&arch=x64" | 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 ug=rwX,o=rX /app
|
|
|
|
# chown -R sonarr /app && \
|
|
|
|
# chown -R sonarr /config
|
|
|
|
|
2022-08-23 07:33:14 -04:00
|
|
|
# Set startup conditions
|
|
|
|
VOLUME /config
|
|
|
|
EXPOSE 8989
|
2023-03-20 22:08:43 -04:00
|
|
|
# USER sonarr
|
2022-08-23 07:33:14 -04:00
|
|
|
WORKDIR /app
|
2023-03-20 22:08:43 -04:00
|
|
|
ENTRYPOINT ["/app/bin/Sonarr"]
|
2022-08-23 07:33:14 -04:00
|
|
|
CMD ["--nobrowser", "--data=/config"]
|
|
|
|
|
|
|
|
|
|
|
|
|