Pull image (from Docker Hub):
docker pull pablocasia/latex
Only use filename, without .tex extension
docker run --rm -v `pwd`:/latex pablocasia/latex build filename
Use -b option, example:
docker run --rm -v `pwd`:/latex pablocasia/latex build -b filename
docker run --rm -v `pwd`:/latex pablocasia/latex build_xelatex filename
Use -c option, examples:
docker run --rm -v `pwd`:/latex pablocasia/latex build -c filename
docker run --rm -v `pwd`:/latex pablocasia/latex build -cb filename
docker run --rm -v `pwd`:/latex pablocasia/latex build_xelatex -c filename
docker run --rm -v `pwd`:/latex pablocasia/latex clean