Dockerfile-base 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. # --------------------------------------------------
  2. # Overleaf Base Image (sharelatex/sharelatex-base)
  3. # --------------------------------------------------
  4. FROM phusion/baseimage:0.11
  5. ENV baseDir .
  6. # Install dependencies
  7. # --------------------
  8. RUN apt-get update \
  9. && apt-get install -y \
  10. build-essential wget net-tools unzip time imagemagick optipng strace nginx git python zlib1g-dev libpcre3-dev \
  11. qpdf \
  12. 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 \
  13. \
  14. # install Node.JS 10
  15. && curl -sSL https://deb.nodesource.com/setup_10.x | bash - \
  16. && apt-get install -y nodejs \
  17. \
  18. && rm -rf \
  19. # We are adding a custom nginx config in the main Dockerfile.
  20. /etc/nginx/nginx.conf \
  21. /etc/nginx/sites-enabled/default \
  22. /var/lib/apt/lists/*
  23. # Install Grunt
  24. # ------------
  25. RUN npm install -g \
  26. grunt-cli \
  27. && rm -rf /root/.npm
  28. # Install TexLive
  29. # ---------------
  30. # CTAN mirrors occasionally fail, in that case install TexLive against an
  31. # specific server, for example http://ctan.crest.fr
  32. #
  33. # # docker build \
  34. # --build-arg TEXLIVE_MIRROR=http://ctan.crest.fr/tex-archive/systems/texlive/tlnet \
  35. # -f Dockerfile-base -t sharelatex/sharelatex-base .
  36. ARG TEXLIVE_MIRROR=http://mirror.ctan.org/systems/texlive/tlnet
  37. ENV PATH "${PATH}:/usr/local/texlive/2020/bin/x86_64-linux"
  38. RUN mkdir /install-tl-unx \
  39. && curl -sSL \
  40. ${TEXLIVE_MIRROR}/install-tl-unx.tar.gz \
  41. | tar -xzC /install-tl-unx --strip-components=1 \
  42. \
  43. && echo "tlpdbopt_autobackup 0" >> /install-tl-unx/texlive.profile \
  44. && echo "tlpdbopt_install_docfiles 0" >> /install-tl-unx/texlive.profile \
  45. && echo "tlpdbopt_install_srcfiles 0" >> /install-tl-unx/texlive.profile \
  46. && echo "selected_scheme scheme-basic" >> /install-tl-unx/texlive.profile \
  47. \
  48. && /install-tl-unx/install-tl \
  49. -profile /install-tl-unx/texlive.profile \
  50. -repository ${TEXLIVE_MIRROR} \
  51. \
  52. && tlmgr install --repository ${TEXLIVE_MIRROR} \
  53. latexmk \
  54. texcount \
  55. \
  56. && rm -rf /install-tl-unx
  57. # Set up sharelatex user and home directory
  58. # -----------------------------------------
  59. RUN adduser --system --group --home /var/www/sharelatex --no-create-home sharelatex && \
  60. mkdir -p /var/lib/sharelatex && \
  61. chown www-data:www-data /var/lib/sharelatex && \
  62. mkdir -p /var/log/sharelatex && \
  63. chown www-data:www-data /var/log/sharelatex && \
  64. mkdir -p /var/lib/sharelatex/data/template_files && \
  65. chown www-data:www-data /var/lib/sharelatex/data/template_files