forked from Paperist/texlive-ja
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
executable file
·49 lines (36 loc) · 1.25 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
# syntax=docker/dockerfile:1
# Copyright (c) 2016 Kaito Udagawa
# Copyright (c) 2016-2020 3846masa
# Copyright (c) 2021 Keisuke Nitta
# Released under the MIT license
# https://opensource.org/licenses/MIT
FROM debian:buster-slim AS base
RUN apt-get update && \
apt-get install -y git perl wget xz-utils && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
ENV PATH=/usr/local/texlive/latest/bin/linux:$PATH
FROM --platform=$BUILDPLATFORM debian:buster-slim AS install
ARG BUILDPLATFORM
ARG TARGETPLATFORM
RUN apt-get update && \
apt-get install -y perl curl wget xz-utils
COPY --from=base /lib /target-lib
WORKDIR /work
COPY ./copy-lib.sh /work/
RUN /work/copy-lib.sh $TARGETPLATFORM $BUILDPLATFORM
COPY ./texlive.profile /work/
COPY ./texlive-arch.sh /work/
RUN curl -L https://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz | tar zx -C /work
COPY ./install.sh /work/
RUN cd ./install-tl-* && /work/install.sh $(/work/texlive-arch.sh $TARGETPLATFORM) /work/texlive.profile
RUN ln -sf /usr/local/texlive/latest/bin/*-linux /usr/local/texlive/latest/bin/linux
FROM base AS dist
COPY --from=install /usr/local/texlive /usr/local/texlive
RUN tlmgr install \
latexmk \
physics \
siunitx
WORKDIR /work
VOLUME ["/work"]
CMD [ "bash" ]