update dockerfile for v4
This commit is contained in:
parent
418fa7e895
commit
3ff5be41fd
45
Dockerfile
45
Dockerfile
@ -1,4 +1,4 @@
|
|||||||
ARG SONARR_VERSION=3.0.9.1549
|
ARG SONARR_VERSION=4.0.0.401
|
||||||
#FROM golang:bullseye AS builder
|
#FROM golang:bullseye AS builder
|
||||||
#ARG SHOUTRRR_VERSION
|
#ARG SHOUTRRR_VERSION
|
||||||
#RUN git clone -b ${SHOUTRRR_VERSION} --depth 1 https://github.com/containrrr/shoutrrr.git ./shoutrrr
|
#RUN git clone -b ${SHOUTRRR_VERSION} --depth 1 https://github.com/containrrr/shoutrrr.git ./shoutrrr
|
||||||
@ -6,10 +6,11 @@ ARG SONARR_VERSION=3.0.9.1549
|
|||||||
# mkdir /output && \
|
# mkdir /output && \
|
||||||
# go build -o /output ./shoutrrr
|
# go build -o /output ./shoutrrr
|
||||||
|
|
||||||
FROM debian:10-slim
|
FROM debian:buster-slim
|
||||||
ARG SONARR_VERSION
|
ARG SONARR_VERSION
|
||||||
WORKDIR /root
|
WORKDIR /root
|
||||||
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
|
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
|
||||||
|
|
||||||
# Install tools to add extra repos
|
# Install tools to add extra repos
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
apt-get -y --no-install-recommends install \
|
apt-get -y --no-install-recommends install \
|
||||||
@ -21,37 +22,41 @@ RUN apt-get update && \
|
|||||||
apt-transport-https \
|
apt-transport-https \
|
||||||
tar \
|
tar \
|
||||||
dirmngr
|
dirmngr
|
||||||
|
|
||||||
# Add Mono repo key
|
# Add Mono repo key
|
||||||
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF \
|
|
||||||
# Add Mono repo
|
# 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
|
# Mediainfo repo install
|
||||||
&& curl -O https://mediaarea.net/repo/deb/repo-mediaarea_1.0-20_all.deb \
|
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF && \
|
||||||
&& dpkg -i repo-mediaarea_1.0-20_all.deb \
|
echo "deb https://download.mono-project.com/repo/debian stable-buster main" | tee /etc/apt/sources.list.d/mono-official-stable.list && \
|
||||||
&& apt-get update
|
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
|
||||||
|
|
||||||
# Install dependancies
|
# Install dependancies
|
||||||
RUN apt-get -y install \
|
RUN apt-get -y install \
|
||||||
sqlite3 \
|
sqlite3 \
|
||||||
mono-complete \
|
mono-complete \
|
||||||
mediainfo \
|
mediainfo && \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Create the user that will run the service
|
# 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 sonarr
|
||||||
# Download and extract the package
|
# Download and extract the package
|
||||||
RUN mkdir -p /app/bin \
|
RUN mkdir -p /app/bin && \
|
||||||
&& mkdir /config \
|
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 \
|
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 \
|
rm -rf /app/bin/Sonarr.Update && \
|
||||||
&& echo -e "PackageVersion=${SONARR_VERSION}\nPackageAuthor=Michael\nUpdateMethod=Docker\nBranch=main" > "/app/package_info" \
|
echo -e "PackageVersion=${SONARR_VERSION}\nPackageAuthor=Michael\nUpdateMethod=Docker\nBranch=main" > "/app/package_info" && \
|
||||||
&& chmod -R u=rwX,go=rX /app \
|
chmod -R ug=rwX,o=rX /app
|
||||||
&& chown -R sonarr /app \
|
# chown -R sonarr /app && \
|
||||||
&& chown -R sonarr /config
|
# chown -R sonarr /config
|
||||||
|
|
||||||
# Set startup conditions
|
# Set startup conditions
|
||||||
VOLUME /config
|
VOLUME /config
|
||||||
EXPOSE 8989
|
EXPOSE 8989
|
||||||
USER sonarr
|
# USER sonarr
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
ENTRYPOINT ["mono", "--debug", "/app/bin/Sonarr.exe"]
|
ENTRYPOINT ["/app/bin/Sonarr"]
|
||||||
CMD ["--nobrowser", "--data=/config"]
|
CMD ["--nobrowser", "--data=/config"]
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user