-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
92 lines (84 loc) · 3.19 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
FROM debian:buster-slim
RUN export DEBIAN_FRONTEND=noninteractive \
&& apt-get update -q \
&& apt-get install -qy build-essential wget libfontconfig1 time git sudo \
&& rm -rf /var/lib/apt/lists/*
ARG tlyear
ENV TEXLIVE_VERSION=$tlyear
ENV TEXLIVE_URL=ftp://tug.org/historic/systems/texlive/$TEXLIVE_VERSION
RUN wget $TEXLIVE_URL/install-tl-unx.tar.gz \
&& mkdir /install-tl-unx \
&& tar -xvf install-tl-unx.tar.gz -C /install-tl-unx --strip-components=1 \
&& echo "selected_scheme scheme-basic" >> /install-tl-unx/texlive.profile \
# Generally we want to use the final repo from the given texlive version
&& export TEXLIVE_REPO_FLAG="-repository $TEXLIVE_URL/tlnet-final/" \
# Check if tlnet-final exists (should exist for all but the most recent version of texlive)
&& export TLPDB_EXISTS="$(wget $TEXLIVE_URL/tlnet-final/tlpkg/texlive.tlpdb -v --spider 2>&1 | grep exists )" \
# If tlnet-final doesn't exist (most recent texlive) then use default repo
&& if [ -z "$TLPDB_EXISTS" ]; then export TEXLIVE_REPO_FLAG="" ; fi \
&& /install-tl-unx/install-tl -profile /install-tl-unx/texlive.profile -no-verify-downloads $TEXLIVE_REPO_FLAG \
&& rm -r /install-tl-unx \
&& rm /install-tl-unx.tar.gz
ENV PATH="/usr/local/texlive/$TEXLIVE_VERSION/bin/x86_64-linux:${PATH}"
RUN tlmgr install \
latexmk \
# Needed by (at least one of) spectralsequences examples
pgf \
etoolbox \
pdfcomment \
xkeyval \
datetime2 \
tracklang \
marginnote \
soul \
xcolor \
l3kernel \
l3packages \
oberdiek \
ec \
ms \
luatex85 \
# For building the manual
sansmathfonts \
needspace \
tcolorbox \
environ \
listings \
hyperxmp \
ifmtarg \
totpages \
trimspaces \
zapfding \
symbol \
marvosym \
# For l3build
luatex \
latex-bin \
platex \
uplatex \
tex \
xetex \
# soulpos comes from either bezos (<= 2018) or soulpos (>= 2019)
# bezos went away entirely in 2018.
&& (tlmgr install soulpos || tlmgr install bezos) \
# soulutf8 comes from either oberdiek (<= 2018) or soulutf8 (>= 2019)
&& (tlmgr install soulutf8 || true) \
# zref comes from either oberdiek (<= 2018) or zref (>= 2019)
&& (tlmgr install zref || true) \
# luahbtex needed by l3build, only available in versions >= 2020
&& (tlmgr install luahbtex || true) \
# hypdoc needed to build documentation, only available in >= 2022
&& (tlmgr install hypdoc || true) \
&& tlmgr option -- autobackup 0
# Install l3build. We need a common version independent of the texlive version
# so we do a custom install.
RUN git clone --branch patches --depth 1 https://github.com/hoodmane/l3build.git \
&& cd l3build \
&& chmod 755 l3build.lua \
&& ln -s /l3build/l3build.lua /usr/local/bin/l3build \
# Need to install in a place accessible from both root and other users. This
# path also doesn't have a year in it which is nice.
&& ./l3build.lua install --texmfhome /usr/local/texlive/texmf-local/ \
&& texhash
ENV SAVED_PATH="${PATH}"
WORKDIR /src