2023-03-05 15:45:22 +00:00
|
|
|
# syntax=docker/dockerfile:1
|
|
|
|
|
|
2023-05-16 17:22:43 +01:00
|
|
|
FROM ghcr.io/linuxserver/baseimage-alpine:3.18
|
2015-08-17 13:13:48 +01:00
|
|
|
|
2017-07-12 09:07:08 +01:00
|
|
|
# set version label
|
2023-03-15 17:17:08 +00:00
|
|
|
ARG UNRAR_VERSION=6.2.6
|
2017-07-12 09:07:08 +01:00
|
|
|
ARG BUILD_DATE
|
|
|
|
|
ARG VERSION
|
2019-01-26 21:39:05 -08:00
|
|
|
ARG SABNZBD_VERSION
|
2017-07-12 09:07:08 +01:00
|
|
|
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
|
2022-01-25 21:14:06 +00:00
|
|
|
LABEL maintainer="thespad"
|
2017-07-12 09:07:08 +01:00
|
|
|
|
2022-01-25 21:14:06 +00:00
|
|
|
# environment settings
|
2017-02-08 14:34:00 +00:00
|
|
|
ENV HOME="/config" \
|
2023-05-16 17:22:43 +01:00
|
|
|
PYTHONIOENCODING=utf-8
|
2016-09-04 14:57:17 +01:00
|
|
|
|
2016-06-30 11:15:59 +01:00
|
|
|
RUN \
|
2021-05-14 16:38:24 -04:00
|
|
|
echo "**** install packages ****" && \
|
2022-01-25 21:14:06 +00:00
|
|
|
apk add -U --update --no-cache --virtual=build-dependencies \
|
|
|
|
|
build-base \
|
2021-05-14 16:38:24 -04:00
|
|
|
libffi-dev \
|
2022-01-25 21:14:06 +00:00
|
|
|
openssl-dev \
|
|
|
|
|
python3-dev && \
|
|
|
|
|
apk add -U --update --no-cache \
|
2023-03-15 15:29:26 +00:00
|
|
|
7zip \
|
2022-01-25 21:14:06 +00:00
|
|
|
par2cmdline \
|
2023-03-05 15:45:22 +00:00
|
|
|
python3 && \
|
2022-02-21 20:57:13 +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:38:24 -04:00
|
|
|
if [ -z ${SABNZBD_VERSION+x} ]; then \
|
|
|
|
|
SABNZBD_VERSION=$(curl -s https://api.github.com/repos/sabnzbd/sabnzbd/releases \
|
2023-03-05 15:45:22 +00:00
|
|
|
| jq -r 'first(.[]) | .tag_name'); \
|
2021-05-14 16:38:24 -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 && \
|
2023-05-16 17:22:43 +01:00
|
|
|
python3 -m venv /lsiopy && \
|
|
|
|
|
pip install -U --no-cache-dir \
|
2023-03-05 15:45:22 +00:00
|
|
|
pip \
|
|
|
|
|
wheel && \
|
2023-05-16 17:22:43 +01:00
|
|
|
pip install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.18/ \
|
2021-05-14 16:38:24 -04:00
|
|
|
apprise \
|
|
|
|
|
pynzb \
|
|
|
|
|
requests && \
|
2023-05-16 17:22:43 +01:00
|
|
|
pip install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.18/ -r requirements.txt && \
|
2022-03-10 19:37:50 +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 && \
|
2023-05-16 17:22:43 +01:00
|
|
|
pip install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.18/ -r requirements.txt && \
|
2021-05-14 16:38:24 -04:00
|
|
|
echo "**** cleanup ****" && \
|
2022-01-25 21:14:06 +00:00
|
|
|
apk del --purge \
|
|
|
|
|
build-dependencies && \
|
2021-05-14 16:38:24 -04:00
|
|
|
rm -rf \
|
|
|
|
|
/tmp/* \
|
|
|
|
|
$HOME/.cache
|
2016-08-07 00:51:20 +01:00
|
|
|
|
2022-01-25 21:14:06 +00:00
|
|
|
# add local files
|
2016-08-07 00:51:20 +01:00
|
|
|
COPY root/ /
|
2015-08-17 13:13:48 +01:00
|
|
|
|
2016-08-31 12:08:19 +01:00
|
|
|
# ports and volumes
|
2022-01-25 21:14:06 +00:00
|
|
|
EXPOSE 8080
|
2022-02-21 20:57:13 +00:00
|
|
|
|
2020-01-03 13:32:15 -08:00
|
|
|
VOLUME /config
|