3ea95d1cac
Debian Trixie ships many Python packages (cryptography 43.0.0, cffi, etc.) via apt that conflict with SABnzbd's pinned versions (cryptography==39.0.0, cffi==1.15.1). Pinned deps fail to install because pip can't uninstall the system packages (no RECORD file). Relax all pins so pip uses compatible versions already present.
83 lines
2.5 KiB
Docker
83 lines
2.5 KiB
Docker
FROM debian:trixie-20260610
|
|
LABEL maintainer="Julien Cabillot <dockerimages@cabillot.eu>"
|
|
|
|
RUN groupadd -r -g 666 sabnzbd && \
|
|
useradd -l -r -u 666 -g 666 -d /sabnzbd sabnzbd
|
|
|
|
#
|
|
# Add SABnzbd init script.
|
|
#
|
|
|
|
COPY "sabnzbd.sh" "/sabnzbd.sh"
|
|
RUN chmod 755 "/sabnzbd.sh"
|
|
|
|
#
|
|
# Fix locales to handle UTF-8 characters.
|
|
#
|
|
|
|
ENV LANG C.UTF-8
|
|
|
|
#
|
|
# Install SABnzbd and all required dependencies.
|
|
#
|
|
|
|
# hadolint ignore=DL3008,DL3015,SC3009,DL3003,DL3013,DL3042
|
|
RUN export SABNZBD_VERSION=3.7.2 PAR2CMDLINE_VERSION=v0.6.14-mt1 && \
|
|
export DEBIAN_FRONTEND=noninteractive && \
|
|
export PIP_BREAK_SYSTEM_PACKAGES=1 && \
|
|
export BUILD_PACKAGES="automake build-essential python3-dev libffi-dev" && \
|
|
export RUNTIME_PACKAGES="ca-certificates p7zip-full unrar unzip libgomp1 openssl python3-openssl python3-cffi curl python3-pip" && \
|
|
sed -i "s/Components: main/Components: main contrib non-free/" /etc/apt/sources.list.d/debian.sources && \
|
|
apt-get -qq update && \
|
|
apt-get -qq --yes install $BUILD_PACKAGES $RUNTIME_PACKAGES && \
|
|
curl -SL -o /tmp/sabnzbd.tar.gz https://github.com/sabnzbd/sabnzbd/releases/download/${SABNZBD_VERSION}/SABnzbd-${SABNZBD_VERSION}-src.tar.gz && \
|
|
tar xzf /tmp/sabnzbd.tar.gz && \
|
|
mv SABnzbd-* sabnzbd && \
|
|
sed -i 's/==.*//' /sabnzbd/requirements.txt && \
|
|
pip3 install -r /sabnzbd/requirements.txt && \
|
|
chown -R sabnzbd: sabnzbd && \
|
|
curl -o /tmp/par2cmdline-mt.tar.gz https://codeload.github.com/jkansanen/par2cmdline-mt/tar.gz/${PAR2CMDLINE_VERSION} && \
|
|
tar xzf /tmp/par2cmdline-mt.tar.gz -C /tmp && \
|
|
cd /tmp/par2cmdline-* && \
|
|
aclocal && \
|
|
automake --add-missing && \
|
|
autoconf && \
|
|
./configure && \
|
|
make && \
|
|
make install && \
|
|
apt-get -qq --yes remove --purge $BUILD_PACKAGES && \
|
|
apt-get -qq --yes autoremove --purge && \
|
|
apt-get -qq --yes clean all && \
|
|
rm -rf "/usr/share/doc/"* \
|
|
"/var/cache/"* \
|
|
"/var/lib/apt/lists/"* \
|
|
"/usr/src/"* \
|
|
"/var/cache/"* \
|
|
"/var/log/"{apt/*,dpkg.log} \
|
|
"/var/www/html" \
|
|
"/tmp/"*
|
|
|
|
#
|
|
# Define container settings.
|
|
#
|
|
|
|
VOLUME ["/datadir", "/media"]
|
|
|
|
EXPOSE 8080
|
|
|
|
#
|
|
# Start SABnzbd.
|
|
#
|
|
|
|
WORKDIR "/sabnzbd"
|
|
|
|
# Add Tini
|
|
ENV "TINI_VERSION" "v0.19.0"
|
|
ADD "https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini" "/tini"
|
|
RUN chmod +x "/tini"
|
|
#ENTRYPOINT ["/tini", "--"]
|
|
|
|
CMD ["/sabnzbd.sh"]
|
|
|
|
HEALTHCHECK --interval=10s \
|
|
CMD curl --fail "http://localhost:8080" || exit 1 |