diff --git a/Dockerfile b/Dockerfile index a92251d..9b6d809 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,27 +1,31 @@ -FROM lsiobase/alpine.python +FROM lsiobase/xenial MAINTAINER sparklyballs -# install sabnzbd +# environment settings +ENV HOME="/config" +ARG DEBIAN_FRONTEND="noninteractive" + +# install packages RUN \ - mkdir -p \ - /app/sabnzbd && \ - LATEST_RELEASE=$(curl -sX GET "https://api.github.com/repos/sabnzbd/sabnzbd/releases/latest" | \ - awk '/tag_name/{print $4;exit}' FS='[""]') && \ - curl -o \ - /tmp/sabnzbd.tar.gz -L \ - https://github.com/sabnzbd/sabnzbd/releases/download/"${LATEST_RELEASE}"/SABnzbd-"${LATEST_RELEASE}"-src.tar.gz && \ - tar xf \ - /tmp/sabnzbd.tar.gz -C \ - /app/sabnzbd --strip-components=1 && \ + echo "deb http://ppa.launchpad.net/jcfp/ppa/ubuntu xenial main" | tee -a /etc/apt/sources.list && \ + apt-key adv --keyserver hkp://keyserver.ubuntu.com:11371 --recv-keys 0x98703123E0F52B2BE16D586EF13930B14BB9F05F && \ + apt-get update && \ + apt-get install -y \ + p7zip \ + sabnzbdplus \ + unrar \ + unzip && \ -# cleanup - rm -f \ - /tmp/* +# cleanup + apt-get clean && \ + rm -rf \ + /tmp/* \ + /var/lib/apt/lists/* \ + /var/tmp/* -# add local files +# add local files COPY root/ / # ports and volumes -VOLUME /config /downloads /incomplete-downloads EXPOSE 8080 9090 - +VOLUME /config /downloads /incomplete-downloads diff --git a/README.md b/README.md index bcf74e7..461ff41 100644 --- a/README.md +++ b/README.md @@ -64,6 +64,7 @@ See here for info on some of the switch settings for sabnzbd http://wiki.sabnzbd ## Versions ++ **28.08.16:** Rebase to xenial. + **28.08.16:** Rebase to alpine, using git version of sab. + **17.03.16:** Bump to install 1.0 final at startup + **14.03.16:** Refresh image to pick up latest RC diff --git a/root/etc/cont-init.d/20-config b/root/etc/cont-init.d/20-config index 1d6987f..9de439b 100644 --- a/root/etc/cont-init.d/20-config +++ b/root/etc/cont-init.d/20-config @@ -1,13 +1,12 @@ #!/usr/bin/with-contenv bash -# make folders +# make folders mkdir -p \ /downloads \ /incomplete-downloads -# permissions -chown -R abc:abc \ - /app/sabnzbd +# permissions chown abc:abc \ /downloads \ /incomplete-downloads + diff --git a/root/etc/services.d/sabnzbd/run b/root/etc/services.d/sabnzbd/run index a421b75..1a88e63 100644 --- a/root/etc/services.d/sabnzbd/run +++ b/root/etc/services.d/sabnzbd/run @@ -1,5 +1,7 @@ #!/usr/bin/with-contenv bash exec \ - s6-setuidgid abc python /app/sabnzbd/SABnzbd.py \ - -f /config/sabnzbd.ini -b 0 -s 0.0.0.0:8080 + s6-setuidgid abc /usr/bin/sabnzbdplus \ + --config-file /config --server 0.0.0.0:8080 + +