Problem with mktex* generated files when running latex on GCP cloud run
Norbert Preining
norbert at preining.info
Wed Jul 9 08:51:56 CEST 2025
Hi all,
I have a really strange problem. When running latex in a GCP cloud run
via a containerized TeX Live, it seems that files that are generated by
the various
mktex*
scripts behave not as expected.
Example:
******* Dockerfile *********
FROM registry.gitlab.com/islandoftex/images/texlive:TL2023-2023-05-21-full
COPY texmf.cnf /usr/local/texlive/2023/
RUN useradd -m -d /home/worker -s /bin/bash -g users -u 1000 worker
USER worker
WORKDIR /home/worker
COPY main.tex .
COPY compile.sh .
CMD ["/bin/bash", "compile.sh"]
**********************
where texmf.cnf just adds "shell_escape = f"
The compile.sh looks like
********* compile.sh *******
mkdir /tmp/foobar
export TEXMFVAR=/tmp/foobar
echo "=============== ENTERING compile.sh"
set
echo "=============== STARTING COMPILE"
latex main
latex main
dvips main
sleep infinity
****************************
and the document to compile is:
********* main.tex *********
\documentclass{article}
\usepackage[T2A]{fontenc}
\begin{document}
This should be f-l-i: fli
\end{document}
****************************
This triggers:
* on first latex run:
kpathsea: Running mktextfm larm1000
mktextfm: Running mf-nowin -progname=mf \mode:=ljfour; mag:=1; ; nonstopmode; input larm1000
....
mktextfm: /tmp/foobar/fonts/tfm/lh/lh-t2a/larm1000.tfm: successfully generated.
* on second latex run:
kpathsea: Running mktextfm larm1000
mktextfm: /tmp/foobar/fonts/tfm/lh/lh-t2a/larm1000.tfm already exists.
* on dvips run:
This is dvips(k) 2023.1 (TeX Live 2023) Copyright 2023 Radical Eye Software (www.radicaleye.com)
' TeX output 2025.07.09:0618' -> main.ps
dvips: Can't open font metric file larm1000.tfm
dvips: I will use cmr10.tfm instead, so expect bad output.
Now my questions are:
* which did latex try to recreate larm1000 despite being in TEXMFVAR
(and TEXMFVAR does not need a ls-R file)
* why does it report that larm1000.tfm is there, but dvips then cannot
find it
Thanks for any ideas!
Norbert
--
DI Dr Norbert Preining https://www.preining.info
arXiv / Cornell University + IFMGA Guide + TU Wien + TeX Live
GPG: 0x860CDC13 fp: F7D8 A928 26E3 16A1 9FA0 ACF0 6CAC A448 860C DC13
More information about the texhax
mailing list.