Dockerfile 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. ARG BASE_IMAGE=docker.snppla.net/snppla/openvpn:1.0
  2. # Build the WebAPI plugin against the same Python 3 the runtime image uses
  3. FROM ${BASE_IMAGE} AS webapi-build
  4. ARG DEBIAN_FRONTEND=noninteractive
  5. # Current master; v0.2.1 predates the Deluge 2 fixes
  6. ARG WEBAPI_REF=114c39324c1297168ffafd0ee9b2b2726c65408c
  7. RUN apt-get update && \
  8. apt-get install -y --no-install-recommends \
  9. ca-certificates \
  10. git \
  11. python3-setuptools && \
  12. rm -rf /var/lib/apt/lists/*
  13. RUN git clone https://github.com/idlesign/deluge-webapi.git /src && \
  14. git -C /src checkout ${WEBAPI_REF} && \
  15. cd /src && \
  16. rm -rf dist && \
  17. python3 setup.py bdist_egg
  18. FROM ${BASE_IMAGE}
  19. ARG DEBIAN_FRONTEND=noninteractive
  20. EXPOSE 58846
  21. RUN apt-get update && \
  22. apt-get install -y --no-install-recommends software-properties-common gpg-agent && \
  23. add-apt-repository ppa:deluge-team/stable -y && \
  24. apt-get update && \
  25. apt-get install -y --no-install-recommends deluged && \
  26. apt-get purge -y --auto-remove software-properties-common gpg-agent && \
  27. rm -rf /var/lib/apt/lists/*
  28. COPY --from=webapi-build /src/dist/WebAPI-*.egg /config/plugins/
  29. RUN useradd -ms /bin/bash deluge && \
  30. chown -R deluge:deluge /config
  31. COPY deluged_init.sh /sbin/deluged_init.sh
  32. CMD ["/sbin/deluged_init.sh"]