My local Tex Live version is a bit
outdated and I do not want my Debian Jessie to force an update to the
sid
distribution. This is maybe a good point to start running the pdflatex
command in a Docker container
with a newer version.
The following Dockerfile would install the package texlive-full
in a Debian 9 container.
FROM debian:9
RUN apt-get update \
&& apt-get install -y \
texlive-full \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
But I would like to increase the main memory as described here. That can be achieved with the following Dockerfile.
FROM debian:9
RUN apt-get update \
&& apt-get install -y \
texlive-full \
&& echo "\nmain_memory = 12000000" >> /etc/texmf/texmf.d/00debian.cnf \
&& echo "\nextra_mem_bot = 12000000" >> /etc/texmf/texmf.d/00debian.cnf \
&& echo "\nfont_mem_size = 12000000" >> /etc/texmf/texmf.d/00debian.cnf \
&& echo "\npool_size = 12000000" >> /etc/texmf/texmf.d/00debian.cnf \
&& echo "\nbuf_size = 12000000" >> /etc/texmf/texmf.d/00debian.cnf \
&& update-texmf \
&& texhash \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
The image can be build with the following command executed in the directory of the Dockerfile.
docker build -t pdflatex .
Assumed that the main document.tex
file exists in the current directory, the following command will
execute the command pdflatex
in the Docker container.
docker run --rm -v "$PWD":/usr/src/project -w /usr/src/project pdflatex pdflatex document.tex