Parcourir la source

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

GitOrigin-RevId: f2a971c761f09974921bf043e1f4959c63107dd8
Alf Eaton il y a 5 mois
Parent
commit
f605a337aa
4 fichiers modifiés avec 14 ajouts et 24 suppressions
  1. 0 12
      develop/README.md
  2. 2 4
      develop/docker-compose.yml
  3. 0 8
      develop/texlive/Dockerfile
  4. 12 0
      services/clsi/Dockerfile

+ 0 - 12
develop/README.md

@@ -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

+ 2 - 4
develop/docker-compose.yml

@@ -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

+ 0 - 8
develop/texlive/Dockerfile

@@ -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

+ 12 - 0
services/clsi/Dockerfile

@@ -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