Docker peertube image
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.

69 lines
2.3KB

  1. FROM debian:jessie-slim
  2. ARG PEERTUBE_VER=develop
  3. ENV UID=991 GID=991 \
  4. HTTPS=false \
  5. HOSTNAME=peertube.localhost \
  6. PORT=80 \
  7. DATABASE_HOST=localhost \
  8. DATABASE_PORT=5432 \
  9. DATABASE_USERNAME=peertube \
  10. DATABASE_PASSWORD=peertube \
  11. ADMIN_EMAIL=admin@domain.local \
  12. SIGNUP_ENABLE=false \
  13. TRANSCODING_ENABLE=false \
  14. TRANSCODING_THREADS=2 \
  15. BODY_SIZE=100M \
  16. CACHE_SIZE=100 \
  17. SIGNUP_LIMIT=10 \
  18. VIDEO_QUOTA=-1 \
  19. RESOLUTION_280=true \
  20. RESOLUTION_360=true \
  21. RESOLUTION_480=true \
  22. RESOLUTION_720=true \
  23. RESOLUTION_1080=true \
  24. DEBIAN_FRONTEND=noninteractive
  25. RUN groupadd -g 991 peertube && useradd -u 991 -g 991 --create-home peertube \
  26. && echo "deb http://ftp.debian.org/debian jessie-backports main contrib non-free" >> /etc/apt/sources.list \
  27. && apt-get update \
  28. && apt-get -y install curl \
  29. && apt-get -y --no-install-recommends install ffmpeg openssl git build-essential nginx-light redis-server \
  30. && apt-get clean \
  31. && curl -sL https://deb.nodesource.com/setup_8.x | bash - \
  32. && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
  33. && echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \
  34. && apt-get update \
  35. && apt-get -y install -y nodejs yarn --no-install-recommends \
  36. && echo "****** Clone Peertube ******" \
  37. && git clone --branch ${PEERTUBE_VER} https://github.com/Chocobozzz/PeerTube /PeerTube \
  38. && echo "****** chown ******" \
  39. && chown -R peertube:peertube PeerTube \
  40. && cd /PeerTube \
  41. && echo "****** run npm install as user ******" \
  42. && su - peertube -c "cd /PeerTube && npm install" \
  43. && echo "****** run yarn install as user ******" \
  44. && su - peertube -c "cd /PeerTube && yarn install" \
  45. && echo "****** run npm run build as user ******" \
  46. && su - peertube -c "cd /PeerTube && npm run build" \
  47. && apt-get remove --purge --yes build-essential curl git \
  48. && apt-get autoremove -y \
  49. && apt-get clean \
  50. && rm -rf /PeerTube/.git \
  51. && rm -rf /tmp/* /var/lib/apt/lists/* /var/cache/debconf/*-old /home/peertube/.npm \
  52. && rm -rf /usr/share/man/?? \
  53. && rm -rf /usr/share/man/??_*
  54. EXPOSE 8080
  55. COPY rootfs /
  56. RUN chmod +x /usr/local/bin/startup-debian
  57. WORKDIR /PeerTube/
  58. VOLUME ["/PeerTube/certs", "/PeerTube/videos", "/PeerTube/logs", "/PeerTube/previews", "/PeerTube/thumbnails", "/PeerTube/torrents"]
  59. ENTRYPOINT ["/usr/local/bin/startup-debian"]