Dockerfile for a lightweight and easily configurable TinyTex installation, that is good enough for basic LaTeX usage e.g. resume.
docker build -t latex .
docker run --rm -i -v "$PWD":/data latex pdflatex resume.tex
If your .tex file fails to generate, with an error \*.sty not found
, just locate what package contains that .sty and add it to the Dockerfile.
tlmgr search --global --file <your_missing_sty_name>.sty
This way your tinytex installation will contain only the packages you may need.
It works great with the VSCode Latex Extension.
Just add below to settings.json
"latex-workshop.docker.image.latex": "latex",
"latex-workshop.docker.enabled": true,