FROM alpine:3.22 # Update and install latex packages RUN apk update && apk add entr texlive-full # Creating container structure ENV mainFile="" RUN addgroup -g 1000 -S ltxgroup && adduser -u 1000 -S -G ltxgroup ltxuser RUN mkdir -p /app && chown -R ltxuser:ltxgroup /app WORKDIR /app # Copy install scripts USER ltxuser COPY --chown=ltxuser:ltxgroup startup.sh /app/startup.sh COPY --chown=ltxuser:ltxgroup setupFiles /app/setupFiles RUN chmod +x /app/startup.sh /app/setupFiles/install.sh # Versioning file, positioned to run if project files changed. # Change something below this to update the version. RUN date +"%s" > /app/setupFiles/buildDate # Startup command CMD [ "sh", "-c", "/app/startup.sh ${mainFile}" ]