-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
65 lines (54 loc) · 1.59 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
FROM ubuntu:22.04
ENV DEBIAN_FRONTEND noninteractive
ARG ARCHIVE_URL="https://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz"
ARG TEXLIVE_VERSION="2022"
# Set uid and gid to the current user
# ENV USER $(whoami)
ENV UID $(id -u)
ENV GID $(id -g)
# Install general packages
RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
cpanminus \
git \
curl \
wget \
locales \
libfontconfig1 \
ca-certificates && \
# clean to reduce image size
apt-get clean -y && \
apt-get autoremove -y && \
apt-get autoclean -y && \
rm -rf /var/lib/apt/lists/*
# Install TeX Live
# ref: https://tug.org/texlive/quickinstall.html
WORKDIR /tmp/install-tl-unx
COPY ./texlive.profile ./
RUN wget -nv ${ARCHIVE_URL} && \
tar -xzf ./install-tl-unx.tar.gz --strip-components=1 && \
./install-tl --profile=./texlive.profile && \
rm -rf /tmp/install-tl-unx
# Add TeX Live to PATH
ENV PATH /usr/local/texlive/${TEXLIVE_VERSION}/bin/x86_64-linux:$PATH
# Install LaTeX packages with tlmgr
RUN tlmgr update --self --all && tlmgr install \
collection-basic \
collection-latexrecommended \
collection-xetex \
collection-bibtexextra \
collection-binextra \
collection-fontsrecommended \
collection-langenglish \
collection-pictures \
collection-mathscience \
beamer \
latexmk \
latexindent
COPY .latexmkrc /root
# Install perl packages which are requirements of "latexindent"
RUN cpanm Log::Log4perl Log::Dispatch::File YAML::Tiny File::HomeDir Unicode::GCString
WORKDIR /workdir
CMD ["bash"]
CMD ["/bin/bash"]