mirror of
https://github.com/linuxserver/docker-sonarr.git
synced 2026-02-19 22:09:04 +08:00
Move Sonarr to v4.
This commit is contained in:
parent
a393093131
commit
cc03eefbfc
2
.github/workflows/external_trigger.yml
vendored
2
.github/workflows/external_trigger.yml
vendored
@ -20,7 +20,7 @@ jobs:
|
||||
echo "**** External trigger running off of master branch. To disable this trigger, set a Github secret named \"PAUSE_EXTERNAL_TRIGGER_SONARR_MASTER\". ****"
|
||||
echo "External trigger running off of master branch. To disable this trigger, set a Github secret named \`PAUSE_EXTERNAL_TRIGGER_SONARR_MASTER\`" >> $GITHUB_STEP_SUMMARY
|
||||
echo "**** Retrieving external version ****"
|
||||
EXT_RELEASE=$(curl -sX GET http://services.sonarr.tv/v1/releases | jq -r '.[] | select(.branch=="main") | .version')
|
||||
EXT_RELEASE=$(curl -sX GET http://services.sonarr.tv/v1/releases | jq -r '.[] | select(.releaseChannel=="v4-stable") | .version')
|
||||
if [ -z "${EXT_RELEASE}" ] || [ "${EXT_RELEASE}" == "null" ]; then
|
||||
echo "**** Can't retrieve external version, exiting ****"
|
||||
FAILURE_REASON="Can't retrieve external version for sonarr branch master"
|
||||
|
||||
68
Dockerfile
68
Dockerfile
@ -1,83 +1,47 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
|
||||
FROM ghcr.io/linuxserver/baseimage-ubuntu:jammy
|
||||
FROM ghcr.io/linuxserver/baseimage-alpine:3.19
|
||||
|
||||
# set version label
|
||||
ARG BUILD_DATE
|
||||
ARG VERSION
|
||||
ARG SONARR_VERSION
|
||||
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
|
||||
LABEL maintainer="aptalca"
|
||||
LABEL maintainer="thespad"
|
||||
|
||||
# set environment variables
|
||||
ARG DEBIAN_FRONTEND="noninteractive"
|
||||
ENV XDG_CONFIG_HOME="/config/xdg"
|
||||
ENV SONARR_CHANNEL="v4-stable"
|
||||
ENV SONARR_BRANCH="main"
|
||||
|
||||
RUN \
|
||||
echo "**** add mediaarea repository ****" && \
|
||||
curl -L \
|
||||
"https://mediaarea.net/repo/deb/repo-mediaarea_1.0-21_all.deb" \
|
||||
-o /tmp/key.deb && \
|
||||
dpkg -i /tmp/key.deb && \
|
||||
echo "deb https://mediaarea.net/repo/deb/ubuntu jammy main" | tee /etc/apt/sources.list.d/mediaarea.list && \
|
||||
echo "**** add mono repository ****" && \
|
||||
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF && \
|
||||
echo "deb http://download.mono-project.com/repo/ubuntu stable-focal main" | tee /etc/apt/sources.list.d/mono-official.list && \
|
||||
echo "**** install packages ****" && \
|
||||
apt-get update && \
|
||||
apt-get install -y --no-install-recommends \
|
||||
ca-certificates-mono \
|
||||
libmono-system-net-http4.0-cil \
|
||||
libmono-corlib4.5-cil \
|
||||
libmono-microsoft-csharp4.0-cil \
|
||||
libmono-posix4.0-cil \
|
||||
libmono-system-componentmodel-dataannotations4.0-cil \
|
||||
libmono-system-configuration-install4.0-cil \
|
||||
libmono-system-configuration4.0-cil \
|
||||
libmono-system-core4.0-cil \
|
||||
libmono-system-data-datasetextensions4.0-cil \
|
||||
libmono-system-data4.0-cil \
|
||||
libmono-system-identitymodel4.0-cil \
|
||||
libmono-system-io-compression4.0-cil \
|
||||
libmono-system-numerics4.0-cil \
|
||||
libmono-system-runtime-serialization4.0-cil \
|
||||
libmono-system-security4.0-cil \
|
||||
libmono-system-servicemodel4.0a-cil \
|
||||
libmono-system-serviceprocess4.0-cil \
|
||||
libmono-system-transactions4.0-cil \
|
||||
libmono-system-web4.0-cil \
|
||||
libmono-system-xml-linq4.0-cil \
|
||||
libmono-system-xml4.0-cil \
|
||||
libmono-system4.0-cil \
|
||||
mono-runtime \
|
||||
mono-vbnc \
|
||||
mediainfo \
|
||||
xmlstarlet && \
|
||||
apk add --no-cache \
|
||||
icu-libs \
|
||||
sqlite-libs \
|
||||
xmlstarlet && \
|
||||
echo "**** install sonarr ****" && \
|
||||
mkdir -p /app/sonarr/bin && \
|
||||
if [ -z ${SONARR_VERSION+x} ]; then \
|
||||
SONARR_VERSION=$(curl -sX GET http://services.sonarr.tv/v1/releases \
|
||||
| jq -r ".[] | select(.branch==\"$SONARR_BRANCH\") | .version"); \
|
||||
| jq -r "first(.[] | select(.releaseChannel==\"${SONARR_CHANNEL}\") | .version)"); \
|
||||
fi && \
|
||||
curl -o \
|
||||
/tmp/sonarr.tar.gz -L \
|
||||
"https://download.sonarr.tv/v3/${SONARR_BRANCH}/${SONARR_VERSION}/Sonarr.${SONARR_BRANCH}.${SONARR_VERSION}.linux.tar.gz" && \
|
||||
tar xf \
|
||||
"https://download.sonarr.tv/v4/${SONARR_BRANCH}/${SONARR_VERSION}/Sonarr.${SONARR_BRANCH}.${SONARR_VERSION}.linux-musl-x64.tar.gz" && \
|
||||
tar xzf \
|
||||
/tmp/sonarr.tar.gz -C \
|
||||
/app/sonarr/bin --strip-components=1 && \
|
||||
echo "UpdateMethod=docker\nBranch=${SONARR_BRANCH}\nPackageVersion=${VERSION}\nPackageAuthor=[linuxserver.io](https://linuxserver.io)" > /app/sonarr/package_info && \
|
||||
rm -rf /app/sonarr/bin/Sonarr.Update && \
|
||||
echo -e "UpdateMethod=docker\nBranch=${SONARR_BRANCH}\nPackageVersion=${SONARR_VERSION}\nPackageAuthor=[linuxserver.io](https://linuxserver.io)" > /app/sonarr/package_info && \
|
||||
echo "**** cleanup ****" && \
|
||||
apt-get clean && \
|
||||
rm -rf \
|
||||
/tmp/* \
|
||||
/var/lib/apt/lists/* \
|
||||
/var/tmp/*
|
||||
/app/sonarr/bin/Sonarr.Update \
|
||||
/tmp/*
|
||||
|
||||
# add local files
|
||||
# add local files
|
||||
COPY root/ /
|
||||
|
||||
# ports and volumes
|
||||
# ports and volumes
|
||||
EXPOSE 8989
|
||||
|
||||
VOLUME /config
|
||||
|
||||
@ -1,83 +1,47 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
|
||||
FROM ghcr.io/linuxserver/baseimage-ubuntu:arm64v8-jammy
|
||||
FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.19
|
||||
|
||||
# set version label
|
||||
ARG BUILD_DATE
|
||||
ARG VERSION
|
||||
ARG SONARR_VERSION
|
||||
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
|
||||
LABEL maintainer="aptalca"
|
||||
LABEL maintainer="thespad"
|
||||
|
||||
# set environment variables
|
||||
ARG DEBIAN_FRONTEND="noninteractive"
|
||||
ENV XDG_CONFIG_HOME="/config/xdg"
|
||||
ENV SONARR_CHANNEL="v4-stable"
|
||||
ENV SONARR_BRANCH="main"
|
||||
|
||||
RUN \
|
||||
echo "**** add mediaarea repository ****" && \
|
||||
curl -L \
|
||||
"https://mediaarea.net/repo/deb/repo-mediaarea_1.0-21_all.deb" \
|
||||
-o /tmp/key.deb && \
|
||||
dpkg -i /tmp/key.deb && \
|
||||
echo "deb https://mediaarea.net/repo/deb/ubuntu jammy main" | tee /etc/apt/sources.list.d/mediaarea.list && \
|
||||
echo "**** add mono repository ****" && \
|
||||
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF && \
|
||||
echo "deb http://download.mono-project.com/repo/ubuntu stable-focal main" | tee /etc/apt/sources.list.d/mono-official.list && \
|
||||
echo "**** install packages ****" && \
|
||||
apt-get update && \
|
||||
apt-get install -y --no-install-recommends \
|
||||
ca-certificates-mono \
|
||||
libmono-system-net-http4.0-cil \
|
||||
libmono-corlib4.5-cil \
|
||||
libmono-microsoft-csharp4.0-cil \
|
||||
libmono-posix4.0-cil \
|
||||
libmono-system-componentmodel-dataannotations4.0-cil \
|
||||
libmono-system-configuration-install4.0-cil \
|
||||
libmono-system-configuration4.0-cil \
|
||||
libmono-system-core4.0-cil \
|
||||
libmono-system-data-datasetextensions4.0-cil \
|
||||
libmono-system-data4.0-cil \
|
||||
libmono-system-identitymodel4.0-cil \
|
||||
libmono-system-io-compression4.0-cil \
|
||||
libmono-system-numerics4.0-cil \
|
||||
libmono-system-runtime-serialization4.0-cil \
|
||||
libmono-system-security4.0-cil \
|
||||
libmono-system-servicemodel4.0a-cil \
|
||||
libmono-system-serviceprocess4.0-cil \
|
||||
libmono-system-transactions4.0-cil \
|
||||
libmono-system-web4.0-cil \
|
||||
libmono-system-xml-linq4.0-cil \
|
||||
libmono-system-xml4.0-cil \
|
||||
libmono-system4.0-cil \
|
||||
mono-runtime \
|
||||
mono-vbnc \
|
||||
mediainfo \
|
||||
xmlstarlet && \
|
||||
apk add --no-cache \
|
||||
icu-libs \
|
||||
sqlite-libs \
|
||||
xmlstarlet && \
|
||||
echo "**** install sonarr ****" && \
|
||||
mkdir -p /app/sonarr/bin && \
|
||||
if [ -z ${SONARR_VERSION+x} ]; then \
|
||||
SONARR_VERSION=$(curl -sX GET http://services.sonarr.tv/v1/releases \
|
||||
| jq -r ".[] | select(.branch==\"$SONARR_BRANCH\") | .version"); \
|
||||
| jq -r "first(.[] | select(.releaseChannel==\"${SONARR_CHANNEL}\") | .version)"); \
|
||||
fi && \
|
||||
curl -o \
|
||||
/tmp/sonarr.tar.gz -L \
|
||||
"https://download.sonarr.tv/v3/${SONARR_BRANCH}/${SONARR_VERSION}/Sonarr.${SONARR_BRANCH}.${SONARR_VERSION}.linux.tar.gz" && \
|
||||
tar xf \
|
||||
"https://download.sonarr.tv/v4/${SONARR_BRANCH}/${SONARR_VERSION}/Sonarr.${SONARR_BRANCH}.${SONARR_VERSION}.linux-musl-arm64.tar.gz" && \
|
||||
tar xzf \
|
||||
/tmp/sonarr.tar.gz -C \
|
||||
/app/sonarr/bin --strip-components=1 && \
|
||||
echo "UpdateMethod=docker\nBranch=${SONARR_BRANCH}\nPackageVersion=${VERSION}\nPackageAuthor=[linuxserver.io](https://linuxserver.io)" > /app/sonarr/package_info && \
|
||||
rm -rf /app/sonarr/bin/Sonarr.Update && \
|
||||
echo -e "UpdateMethod=docker\nBranch=${SONARR_BRANCH}\nPackageVersion=${SONARR_VERSION}\nPackageAuthor=[linuxserver.io](https://linuxserver.io)" > /app/sonarr/package_info && \
|
||||
echo "**** cleanup ****" && \
|
||||
apt-get clean && \
|
||||
rm -rf \
|
||||
/tmp/* \
|
||||
/var/lib/apt/lists/* \
|
||||
/var/tmp/*
|
||||
/app/sonarr/bin/Sonarr.Update \
|
||||
/tmp/*
|
||||
|
||||
# add local files
|
||||
# add local files
|
||||
COPY root/ /
|
||||
|
||||
# ports and volumes
|
||||
# ports and volumes
|
||||
EXPOSE 8989
|
||||
|
||||
VOLUME /config
|
||||
|
||||
2
Jenkinsfile
vendored
2
Jenkinsfile
vendored
@ -109,7 +109,7 @@ pipeline {
|
||||
steps{
|
||||
script{
|
||||
env.EXT_RELEASE = sh(
|
||||
script: ''' curl -sX GET http://services.sonarr.tv/v1/releases | jq -r '.[] | select(.branch=="main") | .version' ''',
|
||||
script: ''' curl -sX GET http://services.sonarr.tv/v1/releases | jq -r '.[] | select(.releaseChannel=="v4-stable") | .version' ''',
|
||||
returnStdout: true).trim()
|
||||
env.RELEASE_LINK = 'custom_command'
|
||||
}
|
||||
|
||||
@ -63,8 +63,8 @@ This image provides various versions that are available via tags. Please read th
|
||||
|
||||
| Tag | Available | Description |
|
||||
| :----: | :----: |--- |
|
||||
| latest | ✅ | Stable releases from Sonarr (currently v3) |
|
||||
| develop | ✅ | Development releases from Sonarr (currently v4) |
|
||||
| latest | ✅ | Stable releases from Sonarr |
|
||||
| develop | ✅ | Development releases from Sonarr |
|
||||
|
||||
## Application Setup
|
||||
|
||||
@ -310,6 +310,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
|
||||
|
||||
## Versions
|
||||
|
||||
* **30.12.23:** - Rebase master branch to Alpine 3.19.
|
||||
* **15.02.23:** - Rebase master branch to Jammy.
|
||||
* **19.12.22:** - Rebase develop branch Alpine 3.17.
|
||||
* **24.11.22:** - Bump develop branch to v4, rebase to Alpine 3.16.
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
# jenkins variables
|
||||
project_name: docker-sonarr
|
||||
external_type: na
|
||||
custom_version_command: "curl -sX GET http://services.sonarr.tv/v1/releases | jq -r '.[] | select(.branch==\"main\") | .version'"
|
||||
custom_version_command: "curl -sX GET http://services.sonarr.tv/v1/releases | jq -r '.[] | select(.releaseChannel==\"v4-stable\") | .version'"
|
||||
release_type: stable
|
||||
release_tag: latest
|
||||
ls_branch: master
|
||||
|
||||
@ -16,8 +16,8 @@ available_architectures:
|
||||
# development version
|
||||
development_versions: true
|
||||
development_versions_items:
|
||||
- { tag: "latest", desc: "Stable releases from Sonarr (currently v3)" }
|
||||
- { tag: "develop", desc: "Development releases from Sonarr (currently v4)" }
|
||||
- { tag: "latest", desc: "Stable releases from Sonarr" }
|
||||
- { tag: "develop", desc: "Development releases from Sonarr" }
|
||||
|
||||
# container parameters
|
||||
param_container_name: "{{ project_name }}"
|
||||
@ -33,7 +33,7 @@ opt_param_volumes:
|
||||
param_usage_include_ports: true
|
||||
param_ports:
|
||||
- { external_port: "8989", internal_port: "8989", port_desc: "The port for the Sonarr webinterface" }
|
||||
param_usage_include_env: true
|
||||
param_usage_include_env: false
|
||||
param_env_vars:
|
||||
- { env_var: "TZ", env_value: "Europe/London", desc: "Specify a timezone to use EG Europe/London, this is required for Sonarr"}
|
||||
# optional env variables
|
||||
@ -55,6 +55,7 @@ app_setup_block: |
|
||||
|
||||
# changelog
|
||||
changelogs:
|
||||
- { date: "30.12.23:", desc: "Rebase master branch to Alpine 3.19." }
|
||||
- { date: "15.02.23:", desc: "Rebase master branch to Jammy." }
|
||||
- { date: "19.12.22:", desc: "Rebase develop branch Alpine 3.17." }
|
||||
- { date: "24.11.22:", desc: "Bump develop branch to v4, rebase to Alpine 3.16." }
|
||||
|
||||
@ -1,12 +1,6 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
# shellcheck shell=bash
|
||||
|
||||
# cleanup pid if it exists
|
||||
if [[ -e /config/sonarr.pid ]]; then
|
||||
rm -rf /config/sonarr.pid
|
||||
fi
|
||||
|
||||
# permissions
|
||||
lsiown -R abc:abc \
|
||||
/app/sonarr/bin \
|
||||
/config
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
PORT=$(xmlstarlet sel -T -t -v /Config/Port /config/config.xml)
|
||||
if [ -f /config/config.xml ]; then
|
||||
PORT=$(xmlstarlet sel -T -t -v /Config/Port /config/config.xml)
|
||||
fi
|
||||
|
||||
if [[ $(curl -sL "http://localhost:${PORT:-8989}/ping" | jq -r '.status' 2>/dev/null) = "OK" ]]; then
|
||||
exit 0
|
||||
|
||||
@ -3,5 +3,5 @@
|
||||
|
||||
exec \
|
||||
s6-notifyoncheck -d -n 300 -w 1000 \
|
||||
cd /app/sonarr/bin s6-setuidgid abc mono --debug Sonarr.exe \
|
||||
cd /app/sonarr/bin s6-setuidgid abc /app/sonarr/bin/Sonarr \
|
||||
-nobrowser -data=/config
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user