Skip to content

Commit

Permalink
Docker: get back the old stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
anishshobithps committed Jan 11, 2025
1 parent 1c57300 commit d9ebce8
Showing 1 changed file with 10 additions and 29 deletions.
39 changes: 10 additions & 29 deletions .docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,38 +1,19 @@
# Stage 1: Builder with all necessary packages
FROM ubuntu:latest AS builder
FROM ubuntu:22.04

# Install build dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
texlive-full \
perl \
fontconfig \
&& rm -rf /var/lib/apt/lists/*
# Avoid prompts from apt
ENV DEBIAN_FRONTEND=noninteractive

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

# Install minimal runtime dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends \
texlive-xetex \
texlive-fonts-recommended \
texlive-pictures \
fontconfig \
# Install required packages
RUN apt-get update && apt-get install -y \
texlive-full \
latexmk \
&& rm -rf /var/lib/apt/lists/*

# Copy texmf files from builder
COPY --from=builder /usr/share/texmf-dist /usr/share/texmf-dist

# Create a working directory
WORKDIR /latex

# Copy your LaTeX files
# Copy compilation 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

ENTRYPOINT ["/entrypoint.sh"]

0 comments on commit d9ebce8

Please sign in to comment.