This container helps with compilation of latex sources without the need to install all latex packages on your system.
This repository is forked from blang's repository in order to add other packages needed for a CI setup.
First, add your local user to docker group:
sudo usermod -aG docker YOURUSERNAMEbuild:
docker build -t jgoldfar/latex-docker .
docker run --rm -i --user="$(id -u):$(id -g)" --net=none -v "$(pwd)":/data jgoldfar/latex-docker:debian-latest
# Or better in one go (does not start container twice)
docker run --rm -i --user="$(id -u):$(id -g)" --net=none -v "$(pwd)":/data jgoldfar/latex-docker:debian-latest /bin/sh -c "pdflatex example.tex && pdflatex example.tex"
# View
./example.pdfCalled this way, your working directory would be mounted to /data inside container.
Why should I use this container?
- Easy setup
- In the Debian-based images,
chktexandpgfpackages are explicitly installed to ensure they are always available. - The Alpine images are quite small.
-
debianis the "legacy" image containing the complete TeXLive installation on top of Debian Stretch. Previous iterations of this repo called thisdefault. -
debian-minimalis a minimal Debian image containing just TeX & LaTeX, but very few other packages. -
debian-minplusincludes some additional packages on top ofdebian-minimal, primarily for typesetting mathematics. -
alpine-minimalis an Alpine 3.9 image with a working TeX + LaTeX installation, as indebian-minimal -
alpine-minplusincludes some additional packages on top ofalpine-minimal, primarily for typesetting mathematics.