Dockerfile-base 3.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. # --------------------------------------------------
  2. # Overleaf Base Image (sharelatex/sharelatex-base)
  3. # --------------------------------------------------
  4. FROM phusion/baseimage:focal-1.2.0
  5. # Makes sure LuaTex cache is writable
  6. # -----------------------------------
  7. ENV TEXMFVAR=/var/lib/sharelatex/tmp/texmf-var
  8. # Update to ensure dependencies are updated
  9. # ------------------------------------------
  10. ENV REBUILT_AFTER="2023-03-13"
  11. # Install dependencies
  12. # --------------------
  13. RUN apt-get update \
  14. && apt-get install -y \
  15. build-essential wget net-tools unzip time imagemagick optipng strace nginx git python zlib1g-dev libpcre3-dev gettext-base libwww-perl \
  16. qpdf \
  17. aspell aspell-en aspell-af aspell-am aspell-ar aspell-ar-large aspell-bg aspell-bn aspell-br aspell-ca aspell-cs aspell-cy aspell-da aspell-de aspell-de-1901 aspell-el aspell-eo aspell-es aspell-et aspell-eu-es aspell-fa aspell-fo aspell-fr aspell-ga aspell-gl-minimos aspell-gu aspell-he aspell-hi aspell-hr aspell-hsb aspell-hu aspell-hy aspell-id aspell-is aspell-it aspell-kk aspell-kn aspell-ku aspell-lt aspell-lv aspell-ml aspell-mr aspell-nl aspell-no aspell-nr aspell-ns aspell-pa aspell-pl aspell-pt aspell-pt-br aspell-ro aspell-ru aspell-sk aspell-sl aspell-ss aspell-st aspell-sv aspell-tl aspell-tn aspell-ts aspell-uk aspell-uz aspell-xh aspell-zu \
  18. \
  19. # install Node.JS 18
  20. && curl -sSL https://deb.nodesource.com/setup_18.x | bash - \
  21. && apt-get install -y nodejs \
  22. \
  23. && rm -rf \
  24. # We are adding a custom nginx config in the main Dockerfile.
  25. /etc/nginx/nginx.conf \
  26. /etc/nginx/sites-enabled/default \
  27. /var/lib/apt/lists/*
  28. # Install TexLive
  29. # ---------------
  30. # CTAN mirrors occasionally fail, in that case install TexLive using a
  31. # different server, for example https://ctan.crest.fr
  32. #
  33. # # docker build \
  34. # --build-arg TEXLIVE_MIRROR=https://ctan.crest.fr/tex-archive/systems/texlive/tlnet \
  35. # -f Dockerfile-base -t sharelatex/sharelatex-base .
  36. ARG TEXLIVE_MIRROR=https://mirror.ox.ac.uk/sites/ctan.org/systems/texlive/tlnet
  37. RUN mkdir /install-tl-unx \
  38. && wget --quiet https://tug.org/texlive/files/texlive.asc \
  39. && gpg --import texlive.asc \
  40. && rm texlive.asc \
  41. && wget --quiet ${TEXLIVE_MIRROR}/install-tl-unx.tar.gz \
  42. && wget --quiet ${TEXLIVE_MIRROR}/install-tl-unx.tar.gz.sha512 \
  43. && wget --quiet ${TEXLIVE_MIRROR}/install-tl-unx.tar.gz.sha512.asc \
  44. && gpg --verify install-tl-unx.tar.gz.sha512.asc \
  45. && sha512sum -c install-tl-unx.tar.gz.sha512 \
  46. && tar -xz -C /install-tl-unx --strip-components=1 -f install-tl-unx.tar.gz \
  47. && rm install-tl-unx.tar.gz* \
  48. && echo "tlpdbopt_autobackup 0" >> /install-tl-unx/texlive.profile \
  49. && echo "tlpdbopt_install_docfiles 0" >> /install-tl-unx/texlive.profile \
  50. && echo "tlpdbopt_install_srcfiles 0" >> /install-tl-unx/texlive.profile \
  51. && echo "selected_scheme scheme-basic" >> /install-tl-unx/texlive.profile \
  52. \
  53. && /install-tl-unx/install-tl \
  54. -profile /install-tl-unx/texlive.profile \
  55. -repository ${TEXLIVE_MIRROR} \
  56. \
  57. && $(find /usr/local/texlive -name tlmgr) path add \
  58. && tlmgr install --repository ${TEXLIVE_MIRROR} \
  59. latexmk \
  60. texcount \
  61. synctex \
  62. etoolbox \
  63. \
  64. && tlmgr path add \
  65. && rm -rf /install-tl-unx
  66. # Set up sharelatex user and home directory
  67. # -----------------------------------------
  68. RUN adduser --system --group --home /overleaf --no-create-home sharelatex && \
  69. mkdir -p /var/lib/sharelatex && \
  70. chown www-data:www-data /var/lib/sharelatex && \
  71. mkdir -p /var/log/sharelatex && \
  72. chown www-data:www-data /var/log/sharelatex && \
  73. mkdir -p /var/lib/sharelatex/data/template_files && \
  74. chown www-data:www-data /var/lib/sharelatex/data/template_files