-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.lmtx
35 lines (30 loc) · 1.34 KB
/
Dockerfile.lmtx
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
# ConTeXt LMTX is currently not available for Linux/MUSL. Hence, we choose
# Debian instead of Alpine.
FROM debian:testing
# install all relevant packages
RUN apt-get update && \
# for downloading ConTeXt
apt-get install -y --no-install-recommends libc6 ca-certificates wget unzip \
# for downloading modules
rsync gawk \
# for syntax highlighting
vim \
&& rm -rf /var/lib/apt/lists/*
# install ConTeXt LMTX
RUN mkdir context && cd context && wget http://lmtx.pragma-ade.nl/install-lmtx/context-linux-64.zip && \
unzip context-linux-64.zip && rm context-linux-64.zip && \
sh ./install.sh
# adjust PATH
ENV PATH "/context/tex/texmf-linux-64/bin:/context/bin:$PATH"
# install available modules from garden (strategy by Henri Menke, see
# https://mailman.ntg.nl/pipermail/ntg-context/2020/097023.html)
RUN TEXMFMODULES="$(/context/tex/texmf-linux-64/bin/mtxrun --resolve-path "\$TEXMFMODULES")" && \
GARDENRSYNC="contextgarden.net::minimals/current/modules" && \
echo "$TEXMFMODULES" && mkdir -p "${TEXMFMODULES}/" && \
for module in $(rsync "${GARDENRSYNC}/*" | gawk '{print $NF}'); do \
echo "Syncing ${module}" && \
rsync -rpztlv "${GARDENRSYNC}/${module}/" "${TEXMFMODULES}/"; \
done && \
mtxrun --generate
# check if installation succeeded
RUN mtxrun --autogenerate --script context --version