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.

45 lines
1.1 KiB

  1. # We use multi stage builds
  2. FROM node:10-stretch-slim AS build
  3. RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -yq git jq python
  4. RUN npm install -g bower
  5. # install tini in this stage to avoid the need of jq and python
  6. # in the final image
  7. ADD docker-install-tini.sh /usr/local/bin/docker-install-tini.sh
  8. RUN /usr/local/bin/docker-install-tini.sh
  9. COPY . /cryptpad
  10. WORKDIR /cryptpad
  11. RUN npm install --production \
  12. && npm install -g bower \
  13. && bower install --allow-root
  14. FROM node:10-stretch-slim
  15. # You want USE_SSL=true if not putting cryptpad behind a proxy
  16. ENV USE_SSL=false
  17. ENV STORAGE="'./storage/file'"
  18. ENV LOG_TO_STDOUT=true
  19. # Persistent storage needs
  20. VOLUME /cryptpad/cfg
  21. VOLUME /cryptpad/datastore
  22. VOLUME /cryptpad/customize
  23. VOLUME /cryptpad/blobstage
  24. VOLUME /cryptpad/block
  25. VOLUME /cryptpad/blob
  26. VOLUME /cryptpad/data
  27. # Copy cryptpad and tini from the build container
  28. COPY --from=build /sbin/tini /sbin/tini
  29. COPY --from=build /cryptpad /cryptpad
  30. WORKDIR /cryptpad
  31. # Unsafe / Safe ports
  32. EXPOSE 3000 3001
  33. # Run cryptpad on startup
  34. CMD ["/sbin/tini", "--", "/cryptpad/container-start.sh"]