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 \