compress docker stages, rewrite readme, fixes #6 and #7
All checks were successful
/ Build Container (push) Successful in 1h6m50s
All checks were successful
/ Build Container (push) Successful in 1h6m50s
This commit is contained in:
@@ -1,8 +1,7 @@
|
|||||||
FROM alpine:3.22
|
FROM alpine:3.22
|
||||||
|
|
||||||
# Update and install latex packages
|
# Update and install latex packages
|
||||||
RUN apk update
|
RUN apk update && apk add entr texlive-full
|
||||||
RUN apk add entr texlive-full
|
|
||||||
|
|
||||||
# Creating container structure
|
# Creating container structure
|
||||||
ENV mainFile=""
|
ENV mainFile=""
|
||||||
@@ -13,9 +12,8 @@ WORKDIR /app
|
|||||||
# Copy install scripts
|
# Copy install scripts
|
||||||
USER ltxuser
|
USER ltxuser
|
||||||
COPY --chown=ltxuser:ltxgroup startup.sh /app/startup.sh
|
COPY --chown=ltxuser:ltxgroup startup.sh /app/startup.sh
|
||||||
RUN chmod +x /app/startup.sh
|
|
||||||
COPY --chown=ltxuser:ltxgroup setupFiles /app/setupFiles
|
COPY --chown=ltxuser:ltxgroup setupFiles /app/setupFiles
|
||||||
RUN chmod +x /app/setupFiles/install.sh
|
RUN chmod +x /app/startup.sh /app/setupFiles/install.sh
|
||||||
|
|
||||||
# Startup command
|
# Startup command
|
||||||
CMD [ "sh", "-c", "/app/startup.sh ${mainFile}" ]
|
CMD [ "sh", "-c", "/app/startup.sh ${mainFile}" ]
|
||||||
|
|||||||
24
README.md
24
README.md
@@ -3,7 +3,11 @@
|
|||||||
|
|
||||||
Automated build system for compiling Latex Files, mimicing the Overleaf build system.
|
Automated build system for compiling Latex Files, mimicing the Overleaf build system.
|
||||||
|
|
||||||
## Download
|
## Getting Image:
|
||||||
|
|
||||||
|
Either (a) download the image from the dockerhub repository (2.5GB download) or (b) build it locally (5GB download).
|
||||||
|
|
||||||
|
### a. Download
|
||||||
|
|
||||||
This image is published to dockerhub, pull it using
|
This image is published to dockerhub, pull it using
|
||||||
|
|
||||||
@@ -11,19 +15,27 @@ This image is published to dockerhub, pull it using
|
|||||||
docker pull phanipavank/autoltx:latest
|
docker pull phanipavank/autoltx:latest
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### b. Build
|
||||||
|
|
||||||
## Building
|
Clone the repository which contains the Dockerfile and other necessary files.
|
||||||
|
|
||||||
The [DockerFile](./DockerFile) is provided in the root folder of this repo. Build the docker container using
|
```bash
|
||||||
|
git clone https://git.pvnweb.dedyn.io/phanipavank/AutoLTX --depth=1
|
||||||
|
```
|
||||||
|
|
||||||
|
This is hosted on my public git server, use responsibly.
|
||||||
|
|
||||||
|
Then, build the docker container using:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker build -t autoltx:latest .
|
docker build -t autoltx:latest .
|
||||||
```
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
1. Download the overleaf project as a zip file or using the git integration for easier integration.
|
|
||||||
|
|
||||||
2. Use the following command to attach the project folder to the built container.
|
Download the overleaf project as a zip file or using the git integration for easier integration.
|
||||||
|
|
||||||
|
Use the following command to attach the project folder to the built container.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker run --rm -it -e "mainFile=<mainTEXfile>" -v <projectFolderPath>:/app/project:z --user 1000:1000 phanipavank/autoltx:latest
|
docker run --rm -it -e "mainFile=<mainTEXfile>" -v <projectFolderPath>:/app/project:z --user 1000:1000 phanipavank/autoltx:latest
|
||||||
@@ -33,7 +45,7 @@ replace `<mainTEXfile>` with the primary tex file to compile, `<projectFolderP
|
|||||||
|
|
||||||
This will compile your project whenever a change is observed in the `mainTEXfile` file.
|
This will compile your project whenever a change is observed in the `mainTEXfile` file.
|
||||||
|
|
||||||
## Observables:
|
# Observables:
|
||||||
- Compilation starts as soon as you start the container, and if the required files are present in the project folder.
|
- Compilation starts as soon as you start the container, and if the required files are present in the project folder.
|
||||||
- The container will create a new folder `pdf` to store all the build files.
|
- The container will create a new folder `pdf` to store all the build files.
|
||||||
- You can follow the compilation logs in the terminal for any errors or warnings.
|
- You can follow the compilation logs in the terminal for any errors or warnings.
|
||||||
|
|||||||
Reference in New Issue
Block a user