diff --git a/develop/README.md b/develop/README.md index 8d45383c23..b6e0769aec 100644 --- a/develop/README.md +++ b/develop/README.md @@ -19,18 +19,6 @@ bin/up Once the services are running, open 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 diff --git a/develop/docker-compose.yml b/develop/docker-compose.yml index c507966f48..df63fca6a2 100644 --- a/develop/docker-compose.yml +++ b/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 diff --git a/develop/texlive/Dockerfile b/develop/texlive/Dockerfile deleted file mode 100644 index 944681a25f..0000000000 --- a/develop/texlive/Dockerfile +++ /dev/null @@ -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 diff --git a/services/clsi/Dockerfile b/services/clsi/Dockerfile index 0cbe57620b..a95110bd75 100644 --- a/services/clsi/Dockerfile +++ b/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