Dockerfile 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. FROM ubuntu:17.10
  2. MAINTAINER Martin von Gagern <gagern@ma.tum.de>
  3. ADD https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64 /usr/bin/dumb-init
  4. # Disable regular updates, keep security updates, avoid intermediate layers
  5. RUN sed -i 's/^\(deb.*updates\)/#\1/' /etc/apt/sources.list \
  6. && apt-get update \
  7. && apt-get upgrade -y \
  8. && DEBIAN_FRONTEND=noninteractive \
  9. apt-get install -qy --no-install-recommends \
  10. ca-certificates \
  11. ghostscript \
  12. imagemagick \
  13. nodejs \
  14. npm \
  15. texlive-generic-recommended \
  16. texlive-fonts-recommended \
  17. texlive-latex-base \
  18. texlive-latex-extra \
  19. && apt-get clean \
  20. && rm -rf /var/lib/apt/lists/* \
  21. && chmod +x /usr/bin/dumb-init
  22. ENTRYPOINT ["/usr/bin/dumb-init", "--"]
  23. RUN useradd --create-home --home-dir /KaTeX katex \
  24. && mkdir -p /KaTeX/dockers/texcmp /KaTeX/test/screenshotter
  25. ADD package.json /KaTeX/dockers/texcmp/package.json
  26. RUN ( cd /KaTeX/dockers/texcmp; npm install; ) \
  27. && ( cd /KaTeX/test/screenshotter; npm install js-yaml; ) \
  28. && chown -R katex:katex /KaTeX
  29. USER katex