Using Ubuntu 22.04 as operating system having a TeX Live distribution along with some other useful tools, which are required for some LaTeX packages.
This Docker image is being used by the following packages:
gitinfo-lua(GitHub|CTAN)lua-placeholders(GitHub|CTAN)regulatory(GitHub|CTAN)fmtcount(GitHub|CTAN)luakeys(GitHub|CTAN)
To use one of the Docker images, Docker needs to be installed. Check the installation instructions to install Docker. Once you run Docker with an image specified, the image will get downloaded.
Host: ctan.xerdi.com
Repository URL: http://ctan.xerdi.com/texlive/tlnet
Purpose: Private TeX Live tlnet mirror for XDP Docker builds and AI Lab builds. It removes the dependency on external CTAN mirror selection so dev / ai-lab / xdp-docker builds stay reproducible.
Consumers: dev, ai-lab, xdp-docker.
make texlive and the docker-publish workflow already point at the internal mirror. Building directly with docker build also defaults to it:
docker build \
-f Dockerfile.texlive \
--build-arg TL_REPOSITORY=http://ctan.xerdi.com/texlive/tlnet \
-t xdp-docker:latest .To bypass the internal mirror and fall back to public CTAN mirror selection:
docker build \
-f Dockerfile.texlive \
--build-arg TL_REPOSITORY=https://mirror.ctan.org/systems/texlive/tlnet \
-t xdp-docker:external-ctan .The same override works for make:
make texlive TL_REPOSITORY=https://mirror.ctan.org/systems/texlive/tlnetThe TL_REPOSITORY value is used for both the install-tl-unx.tar.gz bootstrap download and install-tl -repository, and is pinned via tlmgr option repository so subsequent tlmgr update --all stays on the same mirror.
Check mirror availability from the build host:
curl -I http://ctan.xerdi.com/texlive/tlnet/install-tl-unx.tar.gz
curl -I http://ctan.xerdi.com/texlive/tlnet/tlpkg/texlive.tlpdbIf these fail, check DNS, routing, firewall, nginx, and the mirror sync service on ctan.xerdi.com. If the host is unreachable from your network, use the external fallback above.
The following example would be applicable for most situations:
docker run --rm -i \
--user="$(id -u):$(id -g)" \
-v "$PWD":/build \
-v "$HOME/texmf":/root/texmf \
"maclotsen/texlive:latest" \
"pdflatex main"However, it’s still quite long and hard to remember.
Therefore, it’s wise to alias this command, so you’d end up with something like xdpdocker pdflatex main.
#!/bin/bash
IMAGE=maclotsen/texlive:with-gf
exec docker run --rm -i \
--user="$(id -u):$(id -g)" \
-v "$PWD":/build \
-v "$HOME/texmf":/root/texmf \
"$IMAGE" "$@"~/bin/xdpdocker
The image uses an alternated configuration of TEXMFDOTDIR. The main difference is that it also allows a thinner TDS variant, which is suitable for single layered projects' directory structures (see XDP Packaging Guidelines).
The definition of TEXMFDOTDIR for this Docker image is:
TEXMFDOTDIR = .;/build//
and could also be achieved on your local development environment by replacing /build with a directory containing all your LaTeX related repositories i.e. ~/src/latex.
Here's an example of gitinfo-luas structure, which is compatible with the thinner TDS variant:
gitinfo-lua
├── doc
│ ├── gitinfo-lua.pdf
│ ├── gitinfo-lua.tex
├── scripts
│ ├── gitinfo-lua.lua
│ ├── gitinfo-lua-cmd.lua
│ └── gitinfo-lua-recorder.lua
└── tex
└── gitinfo-lua.sty
The main difference of this approach is that Lua files don't have to be placed in under scripts/lua, but can directly be placed under scripts instead.
This also counts for TeX files. For example, gitinfo-lua.sty won't have to be placed in either one of the following subdirectories: luahblatex, luahbtex, lualatex, latex, luatex or generic.
However, when sources are compiler-dependent, the TDS layout should be used instead.