Dockerfile 1.4 KB

123456789101112131415161718192021222324252627282930
  1. FROM sharelatex/sharelatex:5.0.3
  2. # apply an override to the swagger-tools package to force security updates to multer and qs
  3. # from https://github.com/overleaf/internal/pull/18433
  4. COPY pr_18433.patch .
  5. RUN patch -p1 < pr_18433.patch && rm pr_18433.patch
  6. RUN npm install --include-workspace-root -w services/history-v1 swagger-tools@0.10.4 && rm -rf /root/.cache /root/.npm $(find /tmp/ -mindepth 1 -maxdepth 1)
  7. # remove google-cloud packages which are unused in server-pro have a vulnerable dependency
  8. RUN npm uninstall -w libraries/logger @google-cloud/logging-bunyan
  9. RUN npm uninstall -w libraries/metrics @google-cloud/opentelemetry-cloud-trace-exporter @google-cloud/profiler
  10. # the passport-twitter package has been removed from the monorepo
  11. RUN npm uninstall -w services/web passport-twitter
  12. # remove the unused services/web/scripts/translations directory
  13. RUN rm -r services/web/scripts/translations
  14. # Validate URL protocol before opening from Visual Editor tooltip
  15. # from https://github.com/overleaf/internal/pull/18393
  16. COPY pr_18393.patch .
  17. RUN patch -p1 < pr_18393.patch && rm pr_18393.patch
  18. # Set isEvalSupported to false when loading a PDF document
  19. # from https://github.com/overleaf/internal/pull/18444
  20. COPY pr_18444.patch .
  21. RUN patch -p1 < pr_18444.patch && rm pr_18444.patch
  22. # ensure that the vulnerability audit is run after all changes
  23. RUN npm audit --audit-level=high