diff --git a/.docker/Dockerfile b/.docker/Dockerfile index fcf7ed8..a8d676e 100644 --- a/.docker/Dockerfile +++ b/.docker/Dockerfile @@ -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"]