-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.texlive
58 lines (41 loc) · 1.59 KB
/
Dockerfile.texlive
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
FROM ubuntu:22.04
LABEL maintainer="Erik Nijenhuis <info@xerdi.com>"
ARG profile=texlive.profile
ENV HOME=/root
ENV TEXLIVE_INSTALL_ENV_NOCHECK=1
ENV TEXLIVE_INSTALL_NO_RESUME=1
ENV TEXLIVE_INSTALL_NO_WELCOME=1
# Install core packages
RUN apt update -q && \
apt install -qy build-essential gawk git curl wget zip perl-base libfontconfig1 fontconfig openjdk-8-jre fonts-liberation fonts-liberation2 lua5.3 lua-busted python3-pygments ghostscript-x imagemagick poppler-utils && \
rm -rf /var/lib/apt/lists/*
# Prepare installation directory
RUN mkdir -p /texlive-setup/install-tl
WORKDIR /texlive-setup
# Download TeX Live
RUN wget https://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz;
# Install TeX Live
RUN tar -xvf install-tl-unx.tar.gz -C ./install-tl --strip-components=1;
COPY misc/$profile /texlive-setup/texlive.profile
WORKDIR /texlive-setup/install-tl
RUN ./install-tl --profile=/texlive-setup/texlive.profile
# Cleanup
RUN rm -rf /texlive-setup
RUN tlmgr update --all;
COPY misc/texmf.cnf /usr/local/texlive/2024/
WORKDIR /root
# Set permissions & Initialize TeX Live
RUN chmod a+rx -R .; \
tlmgr init-usertree; \
texhash /root/texmf
# Load the font db
RUN luaotfload-tool --update;
RUN chmod a+rwx -R $(kpsewhich --var-value TEXMFSYSVAR)
# Add the build directory for compilation
RUN git config --global --add safe.directory /build
# Add an optional TDS as mount
VOLUME /root/texmf
VOLUME /build
WORKDIR /build
# Patch for convert cli (ImageMagick)
RUN sed -i 's/\(<policy domain="coder" rights="\)[^"]*\(" pattern="[^"]*"\)/\1read\2/' /etc/ImageMagick-6/policy.xml