mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-08 12:38:39 +00:00
* Update texcmp to ubuntu 17.04 and avoid mounted host directory Switch to linux 17.04 in order to have a version of nodejs which understands ES6 syntax, for the sake of a consistent codebase. Avoid mounting the host directory, but use “docker cp” instead to transfer files between host and container. This should avoid ownership and permission issues. Support macros with positional arguments. Fix one overline example which caused LaTeX failure due to missing braces. * Extract texcmp results as current user This allows running the texcmp.sh script using sudo on afs. * Change texcmp conversion to gray As per #708, this should increase compatibility with older versions of imagemagick, and might also do a better job of preserving the original sRGB color space. * Abandon tar and use plain docker cp instead Thanks to Erik Demaine for suggesting this. * Move npm install into creation of texcmp docker image
37 lines
1.1 KiB
Docker
37 lines
1.1 KiB
Docker
FROM ubuntu:17.04
|
|
|
|
MAINTAINER Martin von Gagern <gagern@ma.tum.de>
|
|
|
|
ADD https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64 /usr/bin/dumb-init
|
|
|
|
# Disable regular updates, keep security updates, avoid intermediate layers
|
|
RUN sed -i 's/^\(deb.*updates\)/#\1/' /etc/apt/sources.list \
|
|
&& apt-get update \
|
|
&& apt-get upgrade -y \
|
|
&& DEBIAN_FRONTEND=noninteractive \
|
|
apt-get install -qy --no-install-recommends \
|
|
ca-certificates \
|
|
etoolbox \
|
|
ghostscript \
|
|
imagemagick \
|
|
nodejs \
|
|
npm \
|
|
texlive-fonts-recommended \
|
|
texlive-latex-base \
|
|
&& apt-get clean \
|
|
&& rm -rf /var/lib/apt/lists/* \
|
|
&& chmod +x /usr/bin/dumb-init
|
|
|
|
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
|
|
|
|
RUN useradd --create-home --home-dir /KaTeX katex \
|
|
&& mkdir -p /KaTeX/dockers/texcmp /KaTeX/test/screenshotter
|
|
|
|
ADD package.json /KaTeX/dockers/texcmp/package.json
|
|
|
|
RUN ( cd /KaTeX/dockers/texcmp; npm install; ) \
|
|
&& ( cd /KaTeX/test/screenshotter; npm install js-yaml; ) \
|
|
&& chown -R katex:katex /KaTeX
|
|
|
|
USER katex
|