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.

81 lines
2.3 KiB

3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
  1. FROM "debian:stretch"
  2. LABEL maintainer="Julien Cabillot <dockerimages@cabillot.eu>"
  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 python-dev python-pip" && \
  20. export RUNTIME_PACKAGES="ca-certificates p7zip-full python-cheetah python-yenc unrar unzip libgomp1 openssl python-cryptography python-openssl curl" && \
  21. export PIP_PACKAGES="sabyenc" && \
  22. sed -i "s/ main$/ main contrib non-free/" /etc/apt/sources.list && \
  23. apt-get -qq update && \
  24. apt-get -qq --yes install $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 -qq --yes remove --purge $BUILD_PACKAGES && \
  40. apt-get -qq --yes autoremove --purge && \
  41. apt-get -qq --yes clean all && \
  42. rm -rf "/usr/share/doc/"* \
  43. "/var/cache/"* \
  44. "/var/lib/apt/lists/"* \
  45. "/usr/src/"* \
  46. "/var/cache/"* \
  47. "/var/log/"{apt/*,dpkg.log} \
  48. "/var/www/html" \
  49. "/tmp/"*
  50. #
  51. # Define container settings.
  52. #
  53. VOLUME ["/datadir", "/media"]
  54. EXPOSE 8080
  55. #
  56. # Start SABnzbd.
  57. #
  58. WORKDIR "/sabnzbd"
  59. # Add Tini
  60. ENV "TINI_VERSION" "v0.16.1"
  61. ADD "https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini" "/tini"
  62. RUN chmod +x "/tini"
  63. #ENTRYPOINT ["/tini", "--"]
  64. CMD ["/sabnzbd.sh"]
  65. HEALTHCHECK --interval="10s" \
  66. CMD curl --fail "http://localhost:8080" || exit 1