Files
docker-sabnzbd/Dockerfile
T

90 lines
2.6 KiB
Docker
Raw Normal View History

2022-02-21 19:48:08 +00:00
FROM ghcr.io/linuxserver/baseimage-alpine:3.15
2015-08-17 13:13:48 +01:00
2017-07-12 09:05:32 +01:00
# set version label
2022-02-21 20:54:26 +00:00
ARG UNRAR_VERSION=6.1.4
2017-07-12 09:05:32 +01:00
ARG BUILD_DATE
ARG VERSION
2019-01-26 21:09:09 -08:00
ARG SABNZBD_VERSION
2017-07-12 09:05:32 +01:00
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
2022-02-21 19:48:08 +00:00
LABEL maintainer="thespad"
2017-07-12 09:05:32 +01:00
# environment settings
2017-02-08 14:34:00 +00:00
ENV HOME="/config" \
PYTHONIOENCODING=utf-8
2016-06-30 11:15:59 +01:00
RUN \
2021-05-14 16:56:37 -04:00
echo "**** install packages ****" && \
2022-02-21 19:48:08 +00:00
apk add -U --update --no-cache --virtual=build-dependencies \
build-base \
2022-02-21 20:54:26 +00:00
g++ \
2022-02-21 19:48:08 +00:00
gcc \
2021-05-14 16:56:37 -04:00
libffi-dev \
2022-02-21 20:54:26 +00:00
make \
2022-02-21 19:48:08 +00:00
openssl-dev \
python3-dev && \
apk add -U --update --no-cache \
curl \
p7zip \
par2cmdline \
2021-05-14 16:56:37 -04:00
python3 \
2022-02-21 19:48:08 +00:00
py3-pip && \
2022-02-21 20:54:26 +00:00
echo "**** install unrar from source ****" && \
mkdir /tmp/unrar && \
curl -o \
/tmp/unrar.tar.gz -L \
"https://www.rarlab.com/rar/unrarsrc-${UNRAR_VERSION}.tar.gz" && \
tar xf \
/tmp/unrar.tar.gz -C \
/tmp/unrar --strip-components=1 && \
cd /tmp/unrar && \
make && \
install -v -m755 unrar /usr/local/bin && \
echo "**** install sabnzbd ****" && \
2021-05-14 16:56:37 -04:00
if [ -z ${SABNZBD_VERSION+x} ]; then \
SABNZBD_VERSION=$(curl -s https://api.github.com/repos/sabnzbd/sabnzbd/releases/latest \
2022-02-21 20:54:26 +00:00
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
2021-05-14 16:56:37 -04:00
fi && \
mkdir -p /app/sabnzbd && \
curl -o \
/tmp/sabnzbd.tar.gz -L \
"https://github.com/sabnzbd/sabnzbd/releases/download/${SABNZBD_VERSION}/SABnzbd-${SABNZBD_VERSION}-src.tar.gz" && \
tar xf \
/tmp/sabnzbd.tar.gz -C \
/app/sabnzbd --strip-components=1 && \
cd /app/sabnzbd && \
2022-02-21 19:48:08 +00:00
python3 -m pip install --upgrade pip && \
pip3 install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.15/ \
wheel \
2021-05-14 16:56:37 -04:00
apprise \
pynzb \
requests && \
2022-02-21 19:48:08 +00:00
pip3 install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.15/ -r requirements.txt && \
2022-03-10 19:34:34 +00:00
echo "**** install nzb-notify ****" && \
NZBNOTIFY_VERSION=$(curl -s https://api.github.com/repos/caronc/nzb-notify/releases/latest \
| awk '/tag_name/{print $4;exit}' FS='[""]') && \
mkdir -p /app/nzbnotify && \
curl -o \
/tmp/nzbnotify.tar.gz -L \
"https://api.github.com/repos/caronc/nzb-notify/tarball/${NZBNOTIFY_VERSION}" && \
tar xf \
/tmp/nzbnotify.tar.gz -C \
/app/nzbnotify --strip-components=1 && \
cd /app/nzbnotify && \
pip3 install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.15/ -r requirements.txt && \
2021-05-14 16:56:37 -04:00
echo "**** cleanup ****" && \
ln -s \
/usr/bin/python3 \
/usr/bin/python && \
2022-02-21 19:48:08 +00:00
apk del --purge \
build-dependencies && \
2021-05-14 16:56:37 -04:00
rm -rf \
/tmp/* \
$HOME/.cache
2016-08-07 00:51:20 +01:00
# add local files
2016-08-07 00:51:20 +01:00
COPY root/ /
2015-08-17 13:13:48 +01:00
# ports and volumes
2022-02-21 19:48:08 +00:00
EXPOSE 8080
2020-01-02 19:24:50 -08:00
VOLUME /config