Deluge in a container with openvpn
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.

43 lines
1.4 KiB

  1. FROM ubuntu:xenial
  2. MAINTAINER Dave P
  3. # Create user with user/password 'deluge'
  4. RUN useradd --create-home --uid 1000 deluge && \
  5. echo "deluge:deluge" | chpasswd
  6. # Install deluge
  7. COPY auth /home/deluge/.config/deluge/
  8. COPY core.conf /home/deluge/.config/deluge/
  9. COPY web_plugin.conf /home/deluge/.config/deluge/
  10. COPY web.conf /home/deluge/.config/
  11. RUN apt-get update && \
  12. apt-get install -y software-properties-common && \
  13. add-apt-repository -y ppa:deluge-team/ppa && \
  14. apt-get update && \
  15. apt-get -y install deluged deluge-web deluge-console && \
  16. chown -R deluge /home/deluge/.config && \
  17. chgrp -R deluge /home/deluge/.config
  18. # Install supervisor, vnstat
  19. RUN apt-get -y install supervisor vnstat
  20. COPY deluged.conf /etc/supervisor/conf.d/deluged.conf
  21. COPY vnstatd.conf etc/supervisor/conf.d/vnstatd.conf
  22. COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
  23. RUN chown -R deluge /var/lib/vnstat && \
  24. chgrp -R deluge /var/lib/vnstat && \
  25. sed -i -e"s/^UnitMode\s0/UnitMode 1/" /etc/vnstat.conf && \
  26. sed -i -e"s/^RateUnit\s1/RateUnit 0/" /etc/vnstat.conf
  27. # Install openvpn
  28. RUN apt-get install -y openvpn iproute2 && dpkg -l
  29. COPY openvpn.conf /etc/supervisor/conf.d/openvpn.conf
  30. # Expose deluge-web, deluge
  31. EXPOSE 8112
  32. EXPOSE 58846
  33. # EXPOSE 8113 # deluge-web https
  34. # on run, also set a tcp/udp port for torrent peering
  35. # Set boot command
  36. ENTRYPOINT ["supervisord"]