diff --git a/Dockerfile b/Dockerfile index 9ff4156..4d92435 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,23 +1,30 @@ -FROM linuxserver/baseimage -MAINTAINER Stian Larsen +FROM lsiobase/xenial +MAINTAINER sparklyballs -ENV APTLIST="libmono-cil-dev python nzbdrone" +# set environment variables +ARG DEBIAN_FRONTEND="noninteractive" -# Configure nzbdrone's apt repository -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 && \ -apt-get update -q && \ -apt-get install $APTLIST -qy && \ -apt-get clean && \ -rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* +# add sonarr repository +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-get update && \ + apt-get install -y \ + nzbdrone && \ -#Adding Custom files -ADD init/ /etc/my_init.d/ -ADD services/ /etc/service/ -RUN chmod -v +x /etc/service/*/run /etc/my_init.d/*.sh - +# cleanup + apt-get clean && \ + rm -rfv \ + /tmp/* \ + /var/lib/apt/lists/* \ + /var/tmp/* -#Ports and Volumes +# add local files +COPY root/ / + +# ports and volumes VOLUME /config /downloads /tv EXPOSE 8989 diff --git a/README.md b/README.md index 368776d..58f7ebf 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ![https://linuxserver.io](https://www.linuxserver.io/wp-content/uploads/2015/06/linuxserver_medium.png) -The [LinuxServer.io](https://linuxserver.io) team brings you another quality container release featuring auto-update on startup, easy user mapping and community support. Be sure to checkout our [forums](https://forum.linuxserver.io) or for real-time support our [IRC](https://www.linuxserver.io/index.php/irc/) on freenode at `#linuxserver.io`. +The [LinuxServer.io](https://linuxserver.io) team brings you another quality container release featuring easy user mapping and community support. Be sure to checkout our [forums](https://forum.linuxserver.io) or for real-time support our [IRC](https://www.linuxserver.io/index.php/irc/) on freenode at `#linuxserver.io`. # linuxserver/sonarr @@ -37,11 +37,11 @@ docker create \ Part of what makes our containers work so well is by allowing you to specify your own `PUID` and `PGID`. This avoids nasty permissions errors with relation to data volumes (`-v` flags). When an application is installed on the host OS it is normally added to the common group called users, Docker apps due to the nature of the technology can't be added to this group. So we added this feature to let you easily choose when running your containers. -## Updates / Monitoring +## Info -* Upgrade to the latest version of sonarr simply `docker restart sonarr`. * Monitor the logs of the container in realtime `docker logs -f sonarr`. ## Changelog -+ **31.08.2015:** Cleanup, changed sources to fetch binarys from. also a new baseimage. ++ **20.07.16:** Rebase to xenial. ++ **31.08.15:** Cleanup, changed sources to fetch binarys from. also a new baseimage. diff --git a/init/30_cleanpid.sh b/init/30_cleanpid.sh deleted file mode 100644 index 7ec312d..0000000 --- a/init/30_cleanpid.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -if [ -f /config/nzbdrone.pid ]; then rm -r /config/nzbdrone.pid; fi diff --git a/init/95_optnzbdrone_fix.sh b/init/95_optnzbdrone_fix.sh deleted file mode 100644 index 6387d5b..0000000 --- a/init/95_optnzbdrone_fix.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -chown -R abc:abc /opt/NzbDrone diff --git a/root/etc/cont-init.d/30-config b/root/etc/cont-init.d/30-config new file mode 100644 index 0000000..e7ae5bb --- /dev/null +++ b/root/etc/cont-init.d/30-config @@ -0,0 +1,8 @@ +#!/usr/bin/with-contenv bash + +# cleanup pid if it exists +[[ -e /config/nzbdrone.pid ]] && rm -rf /config/nzbdrone.pid + +# permissions +chown -R abc:abc /opt/NzbDrone + diff --git a/root/etc/services.d/sonarr/run b/root/etc/services.d/sonarr/run new file mode 100644 index 0000000..4b2d969 --- /dev/null +++ b/root/etc/services.d/sonarr/run @@ -0,0 +1,5 @@ +#!/usr/bin/with-contenv bash + +umask 0002 + +XDG_CONFIG_HOME="/config/xdg" exec s6-setuidgid abc mono /opt/NzbDrone/NzbDrone.exe -nobrowser -data=/config diff --git a/services/sonarr/run b/services/sonarr/run deleted file mode 100644 index 77086cc..0000000 --- a/services/sonarr/run +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -umask 0002 -XDG_CONFIG_HOME="/config/xdg" exec /sbin/setuser abc mono /opt/NzbDrone/NzbDrone.exe -nobrowser -data=/config