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.

64 lines
2.0KB

  1. FROM alpine:3.7
  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=noninteractiv
  25. RUN addgroup -g 991 peertube && adduser -u 991 -G peertube -s /bin/sh -D -h /home/peertube peertube \
  26. && apk -U upgrade \
  27. && apk add -t build-dependencies \
  28. git \
  29. build-base \
  30. g++ \
  31. python-dev \
  32. make \
  33. && apk add vips-dev fftw-dev vips fftw --update-cache --repository https://dl-3.alpinelinux.org/alpine/edge/testing/ \
  34. && apk -U add yarn ffmpeg libressl su-exec curl nodejs shadow python py-jinja2 bash nginx \
  35. && git clone --branch ${PEERTUBE_VER} https://github.com/Chocobozzz/PeerTube /PeerTube \
  36. && echo "****** chown ******" \
  37. && chown -R peertube:peertube PeerTube \
  38. && cd /PeerTube \
  39. && echo "****** run npm install as user ******" \
  40. && su-exec peertube:peertube npm install \
  41. && echo "****** run yarn install as user ******" \
  42. && bash -c "su-exec peertube:peertube yarn install" \
  43. && echo "****** run npm run build as user ******" \
  44. && bash -c "su-exec peertube:peertube npm run build" \
  45. && apk del build-dependencies \
  46. && rm -rf /tmp/* /PeerTube.git /var/cache/apk/* /var/cache/apk/*
  47. EXPOSE 8080
  48. COPY rootfs /
  49. RUN chmod +x /usr/local/bin/startup-alpine
  50. WORKDIR /PeerTube/
  51. VOLUME ["/PeerTube/certs", "/PeerTube/videos", "/PeerTube/logs", "/PeerTube/previews", "/PeerTube/thumbnails", "/PeerTube/torrents"]
  52. ENTRYPOINT ["/usr/local/bin/startup-alpine"]