From 0d595bb51ed9bdc18c61b8aa82f91386d0224ecc Mon Sep 17 00:00:00 2001 From: sparklyballs Date: Fri, 24 Feb 2017 00:06:12 +0000 Subject: [PATCH 1/9] add inhouse testing branch --- Dockerfile | 23 +++++++++++------------ root/etc/cont-init.d/30-config | 14 +++++++++++++- root/etc/services.d/sonarr/run | 2 +- 3 files changed, 25 insertions(+), 14 deletions(-) diff --git a/Dockerfile b/Dockerfile index d711db5..8856fd0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,32 +1,31 @@ FROM lsiobase/xenial MAINTAINER sparklyballs -# set environment variables +# environment settings ARG DEBIAN_FRONTEND="noninteractive" ENV XDG_CONFIG_HOME="/config/xdg" -# add sonarr repository +# install packages RUN \ - apt-key adv --keyserver keyserver.ubuntu.com --recv-keys FDA5DFFC && \ - echo "deb http://apt.sonarr.tv/ master main" > \ - /etc/apt/sources.list.d/sonarr.list && \ - -# install packages + apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 \ + --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF && \ + echo "deb http://download.mono-project.com/repo/debian wheezy main" \ + | tee /etc/apt/sources.list.d/mono-xamarin.list && \ apt-get update && \ apt-get install -y \ - libcurl3 \ - nzbdrone && \ + libmono-cil-dev \ + mediainfo \ + sqlite3 && \ # cleanup - apt-get clean && \ rm -rf \ /tmp/* \ /var/lib/apt/lists/* \ /var/tmp/* -# add local files +# copy local files COPY root/ / # ports and volumes EXPOSE 8989 -VOLUME /config /downloads /tv +VOLUME /config diff --git a/root/etc/cont-init.d/30-config b/root/etc/cont-init.d/30-config index 7a279d1..fe1618c 100644 --- a/root/etc/cont-init.d/30-config +++ b/root/etc/cont-init.d/30-config @@ -1,9 +1,21 @@ #!/usr/bin/with-contenv bash +# install preview version of sonarr +if [ ! -d "/opt/sonarr" ]; then + mkdir -p /opt/sonarr && \ + curl -o \ + /tmp/sonarr.tar.gz -L \ + "https://download.sonarr.tv/v2/phantom/latest/NzbDrone.phantom.tar.gz" && \ + tar xf \ + /tmp/sonarr.tar.gz -C \ + /opt/sonarr --strip-components=1 && \ +rm /tmp/*.tar.gz +fi + # cleanup pid if it exists [[ -e /config/nzbdrone.pid ]] && \ rm -rf /config/nzbdrone.pid # permissions chown -R abc:abc \ - /opt/NzbDrone + /opt/sonarr diff --git a/root/etc/services.d/sonarr/run b/root/etc/services.d/sonarr/run index 1d2c786..6774015 100644 --- a/root/etc/services.d/sonarr/run +++ b/root/etc/services.d/sonarr/run @@ -2,7 +2,7 @@ umask 022 -cd /opt/NzbDrone || exit +cd /opt/sonarr || exit exec \ s6-setuidgid abc mono --debug NzbDrone.exe \ From 0b17f786d90480ea9aa66267bfae4282144fa8ab Mon Sep 17 00:00:00 2001 From: sparklyballs Date: Wed, 15 Mar 2017 17:30:38 +0000 Subject: [PATCH 2/9] fix formatting markdown README --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index ab1cea1..5946f4e 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ [forumurl]: https://forum.linuxserver.io [ircurl]: https://www.linuxserver.io/irc/ [podcasturl]: https://www.linuxserver.io/podcast/ +[appurl]: https://sonarr.tv/ +[hub]: https://hub.docker.com/r/linuxserver/sonarr/ [![linuxserver.io](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/linuxserver_medium.png)][linuxserverurl] @@ -13,12 +15,10 @@ The [LinuxServer.io][linuxserverurl] team brings you another container release f # linuxserver/sonarr [![](https://images.microbadger.com/badges/image/linuxserver/sonarr.svg)](http://microbadger.com/images/linuxserver/sonarr "Get your own image badge on microbadger.com")[![Docker Pulls](https://img.shields.io/docker/pulls/linuxserver/sonarr.svg)][hub][![Docker Stars](https://img.shields.io/docker/stars/linuxserver/sonarr.svg)][hub][![Build Status](http://jenkins.linuxserver.io:8080/buildStatus/icon?job=Dockers/LinuxServer.io-hub-built/linuxserver-sonarr)](http://jenkins.linuxserver.io:8080/job/Dockers/job/LinuxServer.io-hub-built/job/linuxserver-sonarr/) -[hub]: https://hub.docker.com/r/linuxserver/sonarr/ [Sonarr](https://sonarr.tv/) (formerly NZBdrone) is a PVR for usenet and bittorrent users. It can monitor multiple RSS feeds for new episodes of your favorite shows and will grab, sort and rename them. It can also be configured to automatically upgrade the quality of files already downloaded when a better quality format becomes available. -[![sonarr](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/sonarr-banner.png)][sonarrurl] -[sonarrurl]: https://sonarr.tv/ +[![sonarr](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/sonarr-banner.png)][appurl] ## Usage From 350e851ff67de70a23f72f89f66892aae0d5deab Mon Sep 17 00:00:00 2001 From: sparklyballs Date: Mon, 17 Apr 2017 11:43:29 +0100 Subject: [PATCH 3/9] mono_rebase --- Dockerfile | 18 ------------------ README.md | 20 ++++++++++++++++++-- 2 files changed, 18 insertions(+), 20 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8856fd0..a9b2583 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,24 +5,6 @@ MAINTAINER sparklyballs ARG DEBIAN_FRONTEND="noninteractive" ENV XDG_CONFIG_HOME="/config/xdg" -# install packages -RUN \ - apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 \ - --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF && \ - echo "deb http://download.mono-project.com/repo/debian wheezy main" \ - | tee /etc/apt/sources.list.d/mono-xamarin.list && \ - apt-get update && \ - apt-get install -y \ - libmono-cil-dev \ - mediainfo \ - sqlite3 && \ - -# cleanup - rm -rf \ - /tmp/* \ - /var/lib/apt/lists/* \ - /var/tmp/* - # copy local files COPY root/ / diff --git a/README.md b/README.md index 5946f4e..019c309 100644 --- a/README.md +++ b/README.md @@ -27,13 +27,21 @@ docker create \ --name sonarr \ -p 8989:8989 \ -e PUID= -e PGID= \ - -v /dev/rtc:/dev/rtc:ro \ + -e TZ= \ + -v /etc/localtime:/etc/localtime:ro \ -v :/config \ -v :/tv \ -v :/downloads \ linuxserver/sonarr ``` +You can choose between ,using tags, various branch versions of sonarr, no tag is required to remain on the main branch. + +Add one of the tags, if required, to the linuxserver/sonarr line of the run/create command in the following format, linuxserver/sonarr:develop + +#### Tags ++ **develop** + ## Parameters `The parameters are split into two halves, separated by a colon, the left hand side representing the host and the right the container side. @@ -43,14 +51,19 @@ http://192.168.x.x:8080 would show you what's running INSIDE the container on po * `-p 8989` - the port sonarr webinterface -* `-v /dev/rtc:/dev/rtc:ro` - map hwclock as ReadOnly (mono throws exceptions otherwise) * `-v /config` - database and sonarr configs * `-v /tv` - location of TV library on disk +* `-v /etc/localtime` for timesync - see [Localtime](#localtime) for important information +* `-e TZ` for timezone information, Europe/London - see [Localtime](#localtime) for important information * `-e PGID` for for GroupID - see below for explanation * `-e PUID` for for UserID - see below for explanation It is based on ubuntu xenial with S6 overlay, for shell access whilst the container is running do `docker exec -it sonarr /bin/bash`. +## Localtime + +It is important that you either set `-v /etc/localtime:/etc/localtime:ro` or the TZ variable, mono will throw exceptions without one of them set. + ### User / Group Identifiers Sometimes when using data volumes (`-v` flags) permissions issues can arise between the host OS and the container. We avoid this issue by allowing you to specify the user `PUID` and group `PGID`. Ensure the data volume directory on the host is owned by the same user you specify and it will "just work" TM. @@ -71,6 +84,9 @@ Access the webui at `:8989`, for more information check out [Sonarr](ht ## Changelog ++ **17.04.17:** Switch to using inhouse mono baseimage, adds python also. ++ **14.04.17:** Change to mount /etc/localtime in README, thanks cbgj. ++ **13.04.17:** Switch to official mono repository. + **30.09.16:** Fix umask + **23.09.16:** Add cd to /opt fixes redirects with althub (issue #25) , make XDG config environment variable From 27d8843c78fadb1693bcb2b91779912f9470ba4c Mon Sep 17 00:00:00 2001 From: sparklyballs Date: Tue, 25 Apr 2017 06:52:34 +0100 Subject: [PATCH 4/9] reinstall preview version on every container restart, correct baseimage --- Dockerfile | 2 +- root/etc/cont-init.d/30-config | 25 ++++++++++++++----------- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/Dockerfile b/Dockerfile index a9b2583..8776441 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM lsiobase/xenial +FROM lsiobase/mono MAINTAINER sparklyballs # environment settings diff --git a/root/etc/cont-init.d/30-config b/root/etc/cont-init.d/30-config index fe1618c..6178f36 100644 --- a/root/etc/cont-init.d/30-config +++ b/root/etc/cont-init.d/30-config @@ -1,16 +1,19 @@ #!/usr/bin/with-contenv bash -# install preview version of sonarr -if [ ! -d "/opt/sonarr" ]; then - mkdir -p /opt/sonarr && \ - curl -o \ - /tmp/sonarr.tar.gz -L \ - "https://download.sonarr.tv/v2/phantom/latest/NzbDrone.phantom.tar.gz" && \ - tar xf \ - /tmp/sonarr.tar.gz -C \ - /opt/sonarr --strip-components=1 && \ -rm /tmp/*.tar.gz -fi +# cleanup any existing install +[[ -d /opt/sonarr ]] && \ + rm -rf /opt/sonarr +mkdir -p /opt/sonarr + +# (re)install preview version of sonarr +curl -o \ + /tmp/sonarr.tar.gz -L \ + "https://download.sonarr.tv/v2/phantom/latest/NzbDrone.phantom.tar.gz" +tar xf \ + /tmp/sonarr.tar.gz -C \ + /opt/sonarr --strip-components=1 +rm \ + /tmp/*.tar.gz # cleanup pid if it exists [[ -e /config/nzbdrone.pid ]] && \ From b6d0065f4e9d85e8a9cbc04dd5bb2307e37575a2 Mon Sep 17 00:00:00 2001 From: aptalca Date: Tue, 26 Sep 2017 16:15:46 -0400 Subject: [PATCH 5/9] Update 30-config --- root/etc/cont-init.d/30-config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/root/etc/cont-init.d/30-config b/root/etc/cont-init.d/30-config index 6178f36..ed4fdfd 100644 --- a/root/etc/cont-init.d/30-config +++ b/root/etc/cont-init.d/30-config @@ -8,7 +8,7 @@ mkdir -p /opt/sonarr # (re)install preview version of sonarr curl -o \ /tmp/sonarr.tar.gz -L \ - "https://download.sonarr.tv/v2/phantom/latest/NzbDrone.phantom.tar.gz" + "http://services.sonarr.tv/v1/download/phantom/latest?os=linux" tar xf \ /tmp/sonarr.tar.gz -C \ /opt/sonarr --strip-components=1 From 7b24cd3c27d4a096951f0a310983b36096d7c9d4 Mon Sep 17 00:00:00 2001 From: aptalca Date: Tue, 26 Sep 2017 16:19:55 -0400 Subject: [PATCH 6/9] update exe file name --- root/etc/services.d/sonarr/run | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/root/etc/services.d/sonarr/run b/root/etc/services.d/sonarr/run index 6774015..1a37c93 100644 --- a/root/etc/services.d/sonarr/run +++ b/root/etc/services.d/sonarr/run @@ -5,5 +5,5 @@ umask 022 cd /opt/sonarr || exit exec \ - s6-setuidgid abc mono --debug NzbDrone.exe \ + s6-setuidgid abc mono --debug Sonarr.exe \ -nobrowser -data=/config From 6ea50c5bfa545c3e156bc3382d6b817e1e61a141 Mon Sep 17 00:00:00 2001 From: aptalca Date: Tue, 26 Sep 2017 16:24:59 -0400 Subject: [PATCH 7/9] update pid name --- root/etc/cont-init.d/30-config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/root/etc/cont-init.d/30-config b/root/etc/cont-init.d/30-config index ed4fdfd..43a41ad 100644 --- a/root/etc/cont-init.d/30-config +++ b/root/etc/cont-init.d/30-config @@ -16,8 +16,8 @@ rm \ /tmp/*.tar.gz # cleanup pid if it exists -[[ -e /config/nzbdrone.pid ]] && \ - rm -rf /config/nzbdrone.pid +[[ -e /config/sonarr.pid ]] && \ + rm -rf /config/sonarr.pid # permissions chown -R abc:abc \ From 37c6b5dd3fb7852a8615073372c263a91a72c17b Mon Sep 17 00:00:00 2001 From: aptalca Date: Thu, 28 Sep 2017 15:21:09 -0400 Subject: [PATCH 8/9] fix download url --- root/etc/cont-init.d/30-config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/root/etc/cont-init.d/30-config b/root/etc/cont-init.d/30-config index 43a41ad..0ffa6d8 100644 --- a/root/etc/cont-init.d/30-config +++ b/root/etc/cont-init.d/30-config @@ -8,7 +8,7 @@ mkdir -p /opt/sonarr # (re)install preview version of sonarr curl -o \ /tmp/sonarr.tar.gz -L \ - "http://services.sonarr.tv/v1/download/phantom/latest?os=linux" + "http://services.sonarr.tv/v1/download/phantom/latest?os=linux&version=3" tar xf \ /tmp/sonarr.tar.gz -C \ /opt/sonarr --strip-components=1 From 9cb6b62c5fa51e81903829e9e064c6f98794bee8 Mon Sep 17 00:00:00 2001 From: sparklyballs Date: Wed, 14 Mar 2018 18:38:24 +0000 Subject: [PATCH 9/9] change baseimages to new ubuntu style --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 8776441..a760285 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM lsiobase/mono +FROM lsiobase/mono:xenial MAINTAINER sparklyballs # environment settings