Add with-texlive target to clsi Dockerfile (#31625)

GitOrigin-RevId: f2a971c761f09974921bf043e1f4959c63107dd8
This commit is contained in:
Alf Eaton
2026-03-05 12:43:53 +00:00
committed by Copybot
parent d384e61eb6
commit f605a337aa
4 changed files with 14 additions and 24 deletions

View File

@@ -19,18 +19,6 @@ bin/up
Once the services are running, open <http://localhost/launchpad> to create the first admin account.
## TeX Live
Compiling a PDF requires building a TeX Live image to handle the compilation inside Docker:
```shell
docker build texlive -t texlive-full
```
> [!NOTE]
> To compile on a macOS host, you may need to override the path to the Docker socket by creating a `.env` file in this directory, containing
> `DOCKER_SOCKET_PATH=/var/run/docker.sock.raw`
## Development
To avoid running `bin/build && bin/up` after every code change, you can run Overleaf

View File

@@ -22,13 +22,11 @@ services:
build:
context: ..
dockerfile: services/clsi/Dockerfile
target: with-texlive
env_file:
- dev.env
environment:
- TEXLIVE_IMAGE=texlive-full # docker build texlive -t texlive-full
- SANDBOXED_COMPILES=true
- SANDBOXED_COMPILES_HOST_DIR_COMPILES=${PWD}/compiles
- SANDBOXED_COMPILES_HOST_DIR_OUTPUT=${PWD}/output
- SANDBOXED_COMPILES=false
user: root
volumes:
- ${PWD}/compiles:/overleaf/services/clsi/compiles

View File

@@ -1,8 +0,0 @@
FROM debian:testing-slim
RUN apt-get update
RUN apt-cache depends texlive-full | grep "Depends: " | grep -v -- "-doc" | grep -v -- "-lang-" | sed 's/Depends: //' | xargs apt-get install -y --no-install-recommends
RUN apt-get install -y --no-install-recommends fontconfig inkscape pandoc python3-pygments
RUN useradd tex
USER tex

View File

@@ -39,6 +39,18 @@ COPY libraries/settings/ /overleaf/libraries/settings/
COPY libraries/stream-utils/ /overleaf/libraries/stream-utils/
COPY services/clsi/ /overleaf/services/clsi/
FROM app AS with-texlive
RUN apt-get update \
&& apt-cache depends texlive-full | grep "Depends: " | grep -v -- "-doc" | grep -v -- "-lang-" | sed 's/Depends: //' | xargs apt-get install -y --no-install-recommends \
&& apt-get install -y --no-install-recommends fontconfig inkscape python3-pygments qpdf \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir -p cache compiles output \
&& chown node:node cache compiles output
CMD ["node", "--expose-gc", "app.js"]
FROM app
RUN mkdir -p cache compiles output \
&& chown node:node cache compiles output