Files
docker-sabnzbd/Dockerfile
T

84 lines
2.3 KiB
Docker
Raw Normal View History

2023-02-01 23:26:37 +00:00
# syntax=docker/dockerfile:1
FROM ghcr.io/linuxserver/unrar:latest as unrar
2023-05-11 16:37:47 -04:00
FROM ghcr.io/linuxserver/baseimage-alpine:3.18
2015-08-17 13:13:48 +01:00
2017-07-12 09:05:32 +01:00
# set version label
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-11-23 11:29:45 +00:00
cargo \
2021-05-14 16:56:37 -04:00
libffi-dev \
2022-11-23 11:23:47 +00:00
libxml2-dev \
libxslt-dev \
2022-02-21 19:48:08 +00:00
openssl-dev \
python3-dev && \
apk add -U --update --no-cache \
2023-03-15 17:15:22 +00:00
7zip \
2022-02-21 19:48:08 +00:00
par2cmdline \
2022-11-23 11:19:21 +00:00
python3 && \
2022-02-21 20:54:26 +00:00
echo "**** install sabnzbd ****" && \
2021-05-14 16:56:37 -04:00
if [ -z ${SABNZBD_VERSION+x} ]; then \
2022-07-31 18:13:31 +01:00
SABNZBD_VERSION=$(curl -s https://api.github.com/repos/sabnzbd/sabnzbd/commits/develop \
| jq -r '. | .sha' \
| cut -c1-8); \
2021-05-14 16:56:37 -04:00
fi && \
mkdir -p /app/sabnzbd && \
curl -o \
/tmp/sabnzbd.tar.gz -L \
2022-07-31 18:17:18 +01:00
"https://github.com/sabnzbd/sabnzbd/archive/${SABNZBD_VERSION}.tar.gz" && \
2021-05-14 16:56:37 -04:00
tar xf \
/tmp/sabnzbd.tar.gz -C \
/app/sabnzbd --strip-components=1 && \
cd /app/sabnzbd && \
2023-05-11 16:37:47 -04:00
python3 -m venv /lsiopy && \
pip install -U --no-cache-dir \
2022-11-23 11:19:21 +00:00
pip \
wheel && \
2023-05-15 21:11:16 +01:00
pip install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.18 \
2021-05-14 16:56:37 -04:00
apprise \
pynzb \
requests && \
2023-05-12 17:41:04 +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: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 && \
2023-05-12 17:41:04 +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:56:37 -04:00
echo "**** cleanup ****" && \
2022-02-21 19:48:08 +00:00
apk del --purge \
build-dependencies && \
2021-05-14 16:56:37 -04:00
rm -rf \
/tmp/* \
2022-11-23 11:29:45 +00:00
$HOME/.cache \
2022-11-23 13:16:08 +00:00
$HOME/.cargo
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
# add unrar
COPY --from=unrar /usr/bin/unrar-alpine /usr/bin/unrar
# ports and volumes
2022-02-21 19:48:08 +00:00
EXPOSE 8080
2020-01-02 19:24:50 -08:00
VOLUME /config