Fesco
Fesco

Reputation: 147

Docker Alpine Texlive

I would like to generate pdfs from my working directory with docker file where is texlive included

/***Dockerfile***/
FROM alpine
RUN sed -i -e 's/v3\.4/edge/g' /etc/apk/repositories
RUN echo 'http://dl-cdn.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories

RUN apk update\
&& apk add texlive-full
WORKDIR ./mountvolume

/**Build Image**/
docker build -t texlive .

The Docker Image is working like expectetd but when ich try

docker run -v $PWD:/mountvolume texlive /bin/sh -c 'pdflatex article.tex'

i get the error:

This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016/Alpine Linux) (preloaded format=pdflatex)
 restricted \write18 enabled.
  kpathsea: Running mktexfmt pdflatex.fmt
  Can't locate mktexlsr.pl in @INC (@INC contains: /usr/share/tlpkg    /usr/share/texmf-dist/scripts/texlive /usr/local/lib/perl5/site_perl /usr/local/share/perl5/site_perl /usr/lib/perl5/vendor_perl  /usr/share/perl5/vendor_perl /usr/lib/perl5/core_perl /usr/share/perl5/core_perl  .) at /usr/bin/mktexfmt line 23.

BEGIN failed--compilation aborted at /usr/bin/mktexfmt line 25.

I can't find the format file pdflatex.fmt!

Upvotes: 1

Views: 1772

Answers (1)

VonC
VonC

Reputation: 1324505

Your Dockerfile needs to be a bit more elaborate: see issue 4514

Looks like that texlive package isn't enough to get fully functional TeX system (2015: fmtutil.pl depends on mktexlsr.pl)

texlive has been on testing repo for a long time.
But it's missing some stuff, most important being texlive-texmf. If you want to use texlive today you must install the package from testing, download texlive-20160523b-texmf.tar.xz, copy contents to /usr/share/texmf-dist and reinstall the package from testing.

But:

What alpine needs is to package texlive-texmf too.
But no alpine linux developer has looked into this yet

Upvotes: 2

Related Questions