Compiling TeX in Docker

First pull the texlive container:

podman pull registry.gitlab.com/islandoftex/images/texlive:latest

Then build using the appropriate latexmk command:

podman run -i --rm --name latex -v "$PWD":/usr/src/app -w /usr/src/app texlive:latest latexmk -pdf -bibtex -synctex=1 main.tex

Sources

See https://gitlab.com/islandoftex/images/texlive/-/wikis/Building-LaTeX-documents-locally-using-Docker

See also https://gitlab.com/islandoftex/images/texlive/-/wikis/Compiling-LaTeX-documents-with-GitLab-CI