Docker images for TeXlive that easily adjust to your needs
2.3K
Yet another attempt at coming up with working and generally applicable Docker images for TeXlive.
The basic concept is to provide small-ish base images which install additional packages from CTAN if and when needed.
These images attempt to cover the following use cases:
We currently publish the following images based on different selections from the TeXlive collections suggested by the installer; from smaller to larger:
We also provide PoCs to demonstrate that more involved applications can be built on top of the base images provided here:
The fastest way to build a document at hand (once) is this:
docker run --rm \
--volume `pwd`:/work/src:ro \
--volume `pwd`/out:/work/out \
reitzig/texlive-base-luatex \
work 'lualatex hello_world.tex'
Note:
texlive-base-luatex image are listed in Texlivefile.
You can also use image reitzig/texlive-full instead if you are happy
with downloading a (way) larger image.out. Chose a folder name that you currently
do not use.See the scripts in examples for other ways to use the images.
Place a file called Texlivefile with a list of required CTAN packages,
one name per line, in the source directory.
The container will install all packages on that list before running the work command.
You can adjust some defaults of the main container script by setting environment variables
BUILDSCRIPT (default: build.sh)TEXLIVEFILE (default: Texlivefile)OUTPUT (default: *.pdf *.log)All output of the work command is collected in a single folder; extract it with:
docker cp $container:/work/tmp ./
Run
docker build -t texlive-base-luatex --build-arg "profile=base-luatex" .
to build an image locally. Exchange base-luatex for any of the profile names in
profiles to start from another baseline.
If you repeatedly need the same exact set of dependencies or even sources, it might make sense to create your own TeXlive Docker image. There are two ways to go about that:
Extend one of the existing images using your own Dockerfile (see example); install additional TeXlive (or even Alpine) packages, copy source files or additional scripts into the appropriate folders, fix the work command, or ...
Use install-tl to create your own TeXlive installation profile. Make sure to
x86_64-linuxmusl andbinary_x86_64-linux 1 in the resulting profile file
to binary_x86_64-linux 0.
If you want to use your profile across different TeXlive versions,
replace all occurrences of the TeXlive version (e.g. 2019) with ${tlversion}.
Copy the final file to profiles and run the regular build command.
Content type
Image
Digest
sha256:0bcdfc276…
Size
1.7 GB
Last updated
over 3 years ago
docker pull reitzig/texlive-full