Compile LaTeX documents in Docker containers. No local TeX Live installation needed.
docker pull hieupth/texlive:latest
Compile a specific .tex file with the default engine (pdfLaTeX):
docker run --rm \
-v /path/to/latex/project:/texlive/input \
-v /path/to/output:/texlive/output \
hieupth/texlive main.tex
Or let it auto-detect the first .tex file in the input directory:
docker run --rm \
-v /path/to/latex/project:/texlive/input \
-v /path/to/output:/texlive/output \
hieupth/texlive
The compiled output will appear in the output directory you mounted.
Set the ENGINE environment variable:
docker run --rm \
-e ENGINE=xelatex \
-v /path/to/latex/project:/texlive/input \
-v /path/to/output:/texlive/output \
hieupth/texlive main.tex
ENGINE | Compiler | Output |
|---|---|---|
pdflatex (default) | pdfLaTeX | |
xelatex | XeLaTeX | |
lualatex | LuaLaTeX | |
latex | LaTeX | DVI |
dvilua | DVI LuaLaTeX | DVI |
xdv | XeLaTeX | XDV |
pdfps | LaTeX → dvips → ps2pdf | |
pdfdvi | LaTeX → dvipdf |
Any additional arguments are passed straight to latexmk and override the defaults, e.g. -e '$pdf_mode=5' or an explicit -xelatex:
docker run --rm \
-v /path/to/latex/project:/texlive/input \
-v /path/to/output:/texlive/output \
hieupth/texlive main.tex -e '$bibtex_use=2'
Apache License 2.0.
Copyright © 2026 Hieu Pham. All rights reserved.
Content type
Image
Digest
sha256:498904bfb…
Size
2.6 GB
Last updated
18 days ago
docker pull hieupth/texlive