Dockerfile 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. FROM ubuntu:20.04
  2. # Makes sure LuaTex cache is writable
  3. # -----------------------------------
  4. ENV TEXMFVAR=/var/lib/sharelatex/tmp/texmf-var
  5. # Install dependencies
  6. # --------------------
  7. RUN apt-get update \
  8. && DEBIAN_FRONTEND="noninteractive" apt-get install -y \
  9. build-essential wget net-tools unzip time imagemagick optipng strace nginx git python zlib1g-dev libpcre3-dev \
  10. qpdf \
  11. 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-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-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 \
  12. \
  13. # install Node.JS 12
  14. && curl -sSL https://deb.nodesource.com/setup_12.x | bash - \
  15. && apt-get install -y nodejs \
  16. \
  17. && rm -rf \
  18. # We are adding a custom nginx config in the main Dockerfile.
  19. /etc/nginx/nginx.conf \
  20. /etc/nginx/sites-enabled/default \
  21. /var/lib/apt/lists/*
  22. # Add envsubst
  23. # ------------
  24. ADD server-ce/vendor/envsubst /usr/bin/envsubst
  25. RUN chmod +x /usr/bin/envsubst
  26. # Install TexLive
  27. # ---------------
  28. # CTAN mirrors occasionally fail, in that case install TexLive against an
  29. # specific server, for example http://ctan.crest.fr
  30. #
  31. # # docker build \
  32. # --build-arg TEXLIVE_MIRROR=http://ctan.crest.fr/tex-archive/systems/texlive/tlnet \
  33. # -f Dockerfile-base -t sharelatex/sharelatex-base .
  34. ARG TEXLIVE_MIRROR=http://mirror.ctan.org/systems/texlive/tlnet
  35. ENV PATH "${PATH}:/usr/local/texlive/2021/bin/x86_64-linux"
  36. RUN mkdir /install-tl-unx \
  37. && curl -sSL \
  38. ${TEXLIVE_MIRROR}/install-tl-unx.tar.gz \
  39. | tar -xzC /install-tl-unx --strip-components=1 \
  40. \
  41. && echo "tlpdbopt_autobackup 0" >> /install-tl-unx/texlive.profile \
  42. && echo "tlpdbopt_install_docfiles 0" >> /install-tl-unx/texlive.profile \
  43. && echo "tlpdbopt_install_srcfiles 0" >> /install-tl-unx/texlive.profile \
  44. && echo "selected_scheme scheme-basic" >> /install-tl-unx/texlive.profile \
  45. \
  46. && /install-tl-unx/install-tl \
  47. -profile /install-tl-unx/texlive.profile \
  48. -repository ${TEXLIVE_MIRROR} \
  49. \
  50. && tlmgr install --repository ${TEXLIVE_MIRROR} \
  51. latexmk \
  52. texcount \
  53. synctex \
  54. \
  55. && rm -rf /install-tl-unx
  56. # Set up sharelatex user and home directory
  57. # -----------------------------------------
  58. RUN mkdir -p /var/lib/sharelatex && \
  59. mkdir -p /var/log/sharelatex && \
  60. mkdir -p /var/lib/sharelatex/data/template_files