Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor: External TeX Live docker container #13

Open
wants to merge 14 commits into
base: development
Choose a base branch
from

Conversation

b0ink
Copy link

@b0ink b0ink commented Aug 11, 2024

Depends on thoth-tech/doubtfire-api#38
Feasibility document: thoth-tech/documentation#534

Description

This update takes the TeX Live installation out of the current dev.Dockerfile and creates a new container using the official TeX Live Docker image. This will improve the process of building and deploying the main image as it no longer requires downloading and installing TeX Live.

Similar to the main container, the texlive container is kept alive using

command: /bin/sh -c "while sleep 5000; do :; done"

in the docker-compose setup, allowing doubtfire-api to docker exec into this container without needing to spin a new container up.

The latex_build.sh script is copied from doubtfire-api into the TeX Live container, and executed in the docker exec command, which will then run lualatex.

Two additional environment variables are defined in devcontainer.env

LATEX_CONTAINER_NAME=formatif-texlive-container
LATEX_BUILD_PATH=/texlive/shell/latex_build.sh

These env variables are used in latex_run.sh, and validated in the latex_helper.rb module, which requires the name of the TeX Live container to docker exec into, and the path to where the latex_build.sh is stored on the TeX Live container, as this is defined in texlive.Dockerfile

@b0ink b0ink changed the title Refactor: separate docker container for Texlive and Latex processing Refactor: External TeX Live docker container Aug 20, 2024
@b0ink b0ink marked this pull request as ready for review August 20, 2024 05:19
@JackSCarroll
Copy link

This looks good and works as intended.
The latex container is set up correctly and added to the compose with appropriate shared volumes.
A possible modification to docker-compose.yml is to change while sleep 5000; do :; done to sleep infinity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants