26 lines
684 B
Docker
26 lines
684 B
Docker
# Use a lightweight TeX Live base image
|
|
FROM texlive/texlive:latest
|
|
|
|
# Install required packages
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
texlive-fonts-extra \
|
|
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
|
|
|
# Create a user and group with the same IDs as the host user
|
|
ARG UID=1000
|
|
ARG GID=1000
|
|
RUN groupadd -g ${GID} user && \
|
|
useradd -m -u ${UID} -g ${GID} user
|
|
|
|
# Switch to the newly created user
|
|
USER user
|
|
|
|
# Set the working directory in the container
|
|
WORKDIR /workdir
|
|
|
|
# Copy the LaTeX project into the container
|
|
COPY . /workdir
|
|
|
|
# Set the default command to compile the LaTeX file
|
|
CMD ["latexmk", "-pdflua", "slides.tex", "-shell-escape"]
|