Skip to content

Commit

Permalink
Docker: forgot to change here
Browse files Browse the repository at this point in the history
  • Loading branch information
anishshobithps committed Jan 12, 2025
1 parent 61fbd8c commit e6f57d9
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions .docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,38 @@
FROM alpine:latest AS builder

# Install build dependencies in a single layer to optimize caching
RUN apk add --no-cache \
RUN apk add --no-cache --update \
texlive \
texlive-xetex \
texmf-dist \
texlive-pdftex \
texmf-dist-latexextra \
texmf-dist-fontsextra \
perl \
fontconfig \
perl \
make \
&& texhash

# Stage 2: Final image with only runtime dependencies
FROM alpine:latest

# Install minimal runtime dependencies
RUN apk add --no-cache \
texlive-xetex \
texmf-dist \
# Install minimal runtime dependencies for LaTeX compilation
RUN apk add --no-cache --update \
texlive-pdftex \
texmf-dist-latexextra \
texmf-dist-fontsextra \
fontconfig

# Copy texmf files from builder
# Copy only required texmf directories from builder to minimize image size
COPY --from=builder /usr/share/texmf-dist /usr/share/texmf-dist

# Set working directory
WORKDIR /latex

# Copy your LaTeX files
# Copy your LaTeX files and entrypoint script
COPY entrypoint.sh /entrypoint.sh
COPY *.tex *.cls *.sty ./

# Make entrypoint executable and refresh TeX file database
RUN chmod +x /entrypoint.sh && \
texhash
RUN chmod +x /entrypoint.sh && texhash

# Set default entrypoint
ENTRYPOINT ["/entrypoint.sh"]

0 comments on commit e6f57d9

Please sign in to comment.