Added Dockerfile for compiling
This commit is contained in:
parent
a57c35de74
commit
72d46d08eb
25
Dockerfile
Normal file
25
Dockerfile
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
# 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"]
|
||||||
Loading…
x
Reference in New Issue
Block a user