Running Latex using Docker

A simple way to compile your latex files without installing a latex-distribution is the usage of a docker-container. Thanks to it is easier than ever.

Within your directory with your article.tex invoke:

docker run --rm -i --user="$(id -u):$(id -g)" --net=none -v "$PWD":/data blang/latex xelatex article.tex

The current directory is mounted into the container and thus the latex executable within the container can access the source files (xelatex article.tex) and the results are placed in the current directory too.