A Docker container running on Ubuntu with TexLive full system
docker run -it --rm -v cd /path/to/dir/:/opt/app/ gregunz/texlive filename.tex
Note that /path/to/dir/
should be the absolute path to the directory where filename.tex
and its dependencies are stored.
The command run is the one defined in the Dockerfile as entrypoint (pdflatex).
It can be overriden using the --entrypoint
argument.
For example for the latex
command:
docker run -it --rm -v $(pwd):/opt/app/ --entrypoint latex gregunz/texlive filename.tex
Set an alias:
pdflatex='docker run -it --rm -v $(pwd):/opt/app/ gregunz/texlive'
And use it that way:
cd /path/to/dir/
pdflatex filename.tex
You can setup an alias that way for each command you use regularly.
Any problems? Also remarks appreciated, just open an issue.
gregunz.