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.

48 lines
1.2 KiB

  1. FROM node:6-stretch-slim
  2. # You want USE_SSL=true if not putting cryptpad behind a proxy
  3. ENV USE_SSL=false
  4. ENV STORAGE=\'./storage/file\'
  5. ENV LOG_TO_STDOUT=true
  6. # Persistent storage needs
  7. VOLUME /cryptpad/datastore
  8. VOLUME /cryptpad/customize
  9. VOLUME /cryptpad/blobstage
  10. VOLUME /cryptpad/pins
  11. VOLUME /cryptpad/tasks
  12. VOLUME /cryptpad/block
  13. # Required packages
  14. # jq is a build only dependency, removed in cleanup stage
  15. RUN apt-get update \
  16. && apt-get install -y --no-install-recommends \
  17. git jq python
  18. # Install tini for faux init
  19. # sleep 1 is to ensure overlay2 can catch up with the copy prior to running chmod
  20. COPY ./docker-install-tini.sh /
  21. RUN chmod a+x /docker-install-tini.sh \
  22. && sleep 1 \
  23. && /docker-install-tini.sh \
  24. && rm /docker-install-tini.sh
  25. # Cleanup apt
  26. RUN apt-get remove -y --purge jq python \
  27. && apt-get auto-remove -y \
  28. && apt-get clean \
  29. && rm -rf /var/lib/apt/lists/*
  30. # Install cryptpad
  31. COPY . /cryptpad
  32. WORKDIR /cryptpad
  33. RUN npm install --production \
  34. && npm install -g bower \
  35. && bower install --allow-root
  36. # Unsafe / Safe ports
  37. EXPOSE 3000 3001
  38. # Run cryptpad on startup
  39. CMD ["/sbin/tini", "--", "/cryptpad/container-start.sh"]