Skip to content

Commit

Permalink
Docker: update
Browse files Browse the repository at this point in the history
  • Loading branch information
anishshobithps committed Jan 11, 2025
1 parent 6181a9c commit 2a2e2fc
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions .docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,27 @@
FROM alpine:latest AS builder-texlive

RUN apk add --no-cache git bash wget perl # Perl is required by tlmgr
RUN apk add --no-cache texlive --repository=http://dl-cdn.alpinelinux.org/alpine/v3.18/main
ENV PATH="/usr/local/texlive/2023/bin/x86_64-linux:$PATH"
RUN tlmgr update --self
RUN tlmgr option repository http://mirror.ctan.org/systems/texlive/tlnet

# Install TeX Live and set PATH in one step
RUN apk add --no-cache texlive texlive-full --repository=http://dl-cdn.alpinelinux.org/alpine/v3.18/main \
&& echo "/usr/local/texlive/2024/bin/x86_64-linux:$PATH" > /etc/profile.d/texlive.sh

# Stage 2: Fonts and Packages
FROM builder-texlive AS builder-fonts

RUN tlmgr install xcharter
RUN tlmgr install enumitem hyperref titlesec xstring geometry fancyhdr etoolbox
RUN tlmgr install xcharter enumitem hyperref titlesec xstring geometry fancyhdr etoolbox

# Stage 3: Final Image
FROM alpine:latest

WORKDIR /latex

# Copy necessary files
COPY --from=builder-fonts /usr/local/texlive/2023/texmf-dist /usr/local/texlive/2023/texmf-dist
COPY --from=builder-fonts /usr/local/texlive/2023/bin/x86_64-linux/xelatex /usr/local/texlive/2023/bin/x86_64-linux/xelatex
COPY --from=builder-fonts /usr/local/texlive/2023/bin/x86_64-linux/latexmk /usr/local/texlive/2023/bin/x86_64-linux/latexmk
COPY --from=builder-fonts /usr/local/texlive/2024/texmf-dist /usr/local/texlive/2024/texmf-dist
COPY --from=builder-fonts /usr/local/texlive/2024/bin/x86_64-linux/xelatex /usr/local/texlive/2024/bin/x86_64-linux/xelatex
COPY --from=builder-fonts /usr/local/texlive/2024/bin/x86_64-linux/latexmk /usr/local/texlive/2024/bin/x86_64-linux/latexmk

ENV PATH="/usr/local/texlive/2023/bin/x86_64-linux:$PATH"
# No need to set PATH again, it's already set in Stage 1
COPY entrypoint.sh /entrypoint.sh
COPY *.tex *.bib *.cls /latex/
RUN chmod +x /entrypoint.sh
Expand Down

0 comments on commit 2a2e2fc

Please sign in to comment.