diff --git a/Dockerfile b/Dockerfile index d05ceec..5206850 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,23 +1,21 @@ FROM alpine:3.22 -# update and install latex packages -RUN echo test +# Update and install latex packages RUN apk update RUN apk add entr texlive-full -# creating container structure +# 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 +# Copy install scripts USER ltxuser COPY --chown=ltxuser:ltxgroup startup.sh /app/startup.sh RUN chmod +x /app/startup.sh -RUN echo arstearst COPY --chown=ltxuser:ltxgroup setupFiles /app/setupFiles RUN chmod +x /app/setupFiles/install.sh +# Startup command CMD [ "sh", "-c", "/app/startup.sh ${mainFile}" ] -# CMD [ "ls", "|", "entr", "ls", "-hla" ] diff --git a/README.md b/README.md index 4ef4d83..d6923da 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,29 @@ # AutoLTX +![pulls](https://img.shields.io/docker/pulls/phanipavank/autoltx.svg) ![size](https://img.shields.io/docker/image-size/phanipavank/autoltx.svg) ![version](https://img.shields.io/docker/v/phanipavank/autoltx.svg) Automated build system for compiling Latex Files, mimicing the Overleaf build system. -1. Build the docker container using: +## Download + +This image is published to dockerhub, pull it using + +```bash +docker pull phanipavank/autoltx:latest +``` + + +## Building + +The [DockerFile](./DockerFile) is provided in the root folder of this repo. Build the docker container using + ```bash docker build -t autoltx:latest . ``` -2. Download the overleaf project as a zip file or using the git integration to easily push any changes. +## Usage +1. Download the overleaf project as a zip file or using the git integration for easier integration. -3. Use the following command to attach the project folder to the built container. +2. Use the following command to attach the project folder to the built container. ```bash docker run --rm -it -e "mainFile=" -v :/app/project:z --user 1000:1000 autoltx:latest @@ -19,7 +33,7 @@ replace `` with the primary tex file to compile, ``, called `output.pdf`. Keep it open so any changes to the main tex file, triggers a pdf update. Other files include `compile.sh`: the main compilation script, `latexmkrc`: used by the `latexmk` compiler, edit cautiously, and `.autoltx`: used for versioning the container scripts.