Recette pour la création de l'image sabnzbd
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

66 lines
1.8 KiB

3 years ago
  1. FROM debian:stretch
  2. MAINTAINER Julien Cabillot <jcabillot@gmail.com>
  3. RUN groupadd -r -g 666 sabnzbd && \
  4. useradd -l -r -u 666 -g 666 -d /sabnzbd sabnzbd
  5. #
  6. # Add SABnzbd init script.
  7. #
  8. COPY sabnzbd.sh /sabnzbd.sh
  9. RUN chmod 755 /sabnzbd.sh
  10. #
  11. # Fix locales to handle UTF-8 characters.
  12. #
  13. ENV LANG C.UTF-8
  14. #
  15. # Install SABnzbd and all required dependencies.
  16. #
  17. RUN export SABNZBD_VERSION=2.3.0 PAR2CMDLINE_VERSION=v0.6.14-mt1 && \
  18. export DEBIAN_FRONTEND=noninteractive && \
  19. export BUILD_PACKAGES="automake build-essential curl python-dev python-pip" && \
  20. export RUNTIME_PACKAGES="ca-certificates p7zip-full python-cheetah python-yenc unrar unzip libgomp1 openssl python-cryptography python-openssl" && \
  21. export PIP_PACKAGES="sabyenc" && \
  22. sed -i "s/ main$/ main contrib non-free/" /etc/apt/sources.list && \
  23. apt-get -q update && \
  24. apt-get install -qqy $BUILD_PACKAGES $RUNTIME_PACKAGES && \
  25. pip install $PIP_PACKAGES && \
  26. curl -SL -o /tmp/sabnzbd.tar.gz https://github.com/sabnzbd/sabnzbd/releases/download/${SABNZBD_VERSION}/SABnzbd-${SABNZBD_VERSION}-src.tar.gz && \
  27. tar xzf /tmp/sabnzbd.tar.gz && \
  28. mv SABnzbd-* sabnzbd && \
  29. chown -R sabnzbd: sabnzbd && \
  30. curl -o /tmp/par2cmdline-mt.tar.gz https://codeload.github.com/jkansanen/par2cmdline-mt/tar.gz/${PAR2CMDLINE_VERSION} && \
  31. tar xzf /tmp/par2cmdline-mt.tar.gz -C /tmp && \
  32. cd /tmp/par2cmdline-* && \
  33. aclocal && \
  34. automake --add-missing && \
  35. autoconf && \
  36. ./configure && \
  37. make && \
  38. make install && \
  39. apt-get -y remove --purge $BUILD_PACKAGES && \
  40. apt-get -y autoremove --purge && \
  41. apt-get -y clean all && \
  42. rm -rf /var/lib/apt/lists/* && \
  43. rm -rf /tmp/*
  44. #
  45. # Define container settings.
  46. #
  47. VOLUME ["/datadir", "/media"]
  48. EXPOSE 8080
  49. #
  50. # Start SABnzbd.
  51. #
  52. WORKDIR /sabnzbd
  53. CMD ["/sabnzbd.sh"]