Replace texlive with miktex
saltyJeff opened this issue · 3 comments
If users want to use tex packages that aren't included in the default texlive installation, they have to create a separate docker image: (see here for an example: https://github.com/TTPS-ruby/pandoc-eisvogel)
Replacing texlive with miktex with the auto-install option will allow users to use a wider variety of packages without having to create their own images:
This is the dockerfile I'm using right now, the relevant section is highlighted
FROM ubuntu:bionic
CMD ["bash"]
WORKDIR /data
ENTRYPOINT ["pandoc"]
RUN apt-get update && apt-get install -y gnupg1 curl
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys D6BC243565B2087BC3F897C9277A7293F59E4889 \
&& echo "deb http://miktex.org/download/ubuntu bionic universe" | tee /etc/apt/sources.list.d/miktex.list
# keep the package install list alphabetical
RUN curl -L -o pandoc.deb https://github.com/jgm/pandoc/releases/download/2.18/pandoc-2.18-1-amd64.deb \
&& apt-get update && apt-get install -y --no-install-recommends \
graphviz \
librsvg2-bin \
miktex \
./pandoc.deb \
&& rm pandoc.deb
# The command needed to finish the install of Miktex
RUN miktexsetup finish \
&& initexmf --admin --set-config-value=[MPM]AutoInstall=1 \
&& mpm --admin --update-db \
&& mpm --admin \
--install amsfonts \
--install biber-linux-x86_64 \
&& initexmf --admin --update-fndb
I can modify the relevant sections into something like https://github.com/pandoc/dockerfiles/blob/master/common/latex/install-texlive.sh if you would like
Doesn't TexLive install extra extensions/bits into a special folder? If so, could you use a Podman/Docker Volume and just remount it each subsequent run?
My use case was through Github actions. It was easier to have MikTex auto-download all the dependencies than to keep re-building containers with the required tex packages
This is an interesting idea, as the auto-download feature of MiKTeX is nice. However, there doesn't seem to be a straightforward way of installing MiKTeX on Alpine, one of the platforms we use. This means we can't (easily) replace TeXLive, and I don't want to mix different TeX distributions.
Thank you for bringing it up though.