blang / latex-docker

Docker-based latex compilation
MIT License
578 stars 146 forks source link

Lualatex #24

Open brokenpylons opened 5 years ago

brokenpylons commented 5 years ago

Lualatex uses a cache folder which is not accessible if you change the user to something else than root.

The error:

quiting: fix your writable cache path

My fix:

RUN chmod 1777 /var/lib/texmf

This changes the permissions so any user can write to the cache folder. The location of the cache folder is specified by the TEXMFCACHE environment variable. More info: https://wiki.archlinux.org/index.php/TeX_Live#Usage

brokenpylons commented 5 years ago

On second thought, this is probably better:

ENV TEXMFCACHE /tmp/texmf/
brokenpylons commented 5 years ago

I made a docker file:

The first version includes only the packages needed to run lualatex. The size is 316MB (116MB on dockerhub), which is the lowest I could get without mucking with vanilla texlive (still way better than 3GB+ full image). The second additionally includes build tools (latexmk and make).