mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-12 13:13:45 +01:00
Add with-texlive target to clsi Dockerfile (#31625)
GitOrigin-RevId: f2a971c761f09974921bf043e1f4959c63107dd8
This commit is contained in:
@@ -19,18 +19,6 @@ bin/up
|
|||||||
|
|
||||||
Once the services are running, open <http://localhost/launchpad> to create the first admin account.
|
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
|
## Development
|
||||||
|
|
||||||
To avoid running `bin/build && bin/up` after every code change, you can run Overleaf
|
To avoid running `bin/build && bin/up` after every code change, you can run Overleaf
|
||||||
|
|||||||
@@ -22,13 +22,11 @@ services:
|
|||||||
build:
|
build:
|
||||||
context: ..
|
context: ..
|
||||||
dockerfile: services/clsi/Dockerfile
|
dockerfile: services/clsi/Dockerfile
|
||||||
|
target: with-texlive
|
||||||
env_file:
|
env_file:
|
||||||
- dev.env
|
- dev.env
|
||||||
environment:
|
environment:
|
||||||
- TEXLIVE_IMAGE=texlive-full # docker build texlive -t texlive-full
|
- SANDBOXED_COMPILES=false
|
||||||
- SANDBOXED_COMPILES=true
|
|
||||||
- SANDBOXED_COMPILES_HOST_DIR_COMPILES=${PWD}/compiles
|
|
||||||
- SANDBOXED_COMPILES_HOST_DIR_OUTPUT=${PWD}/output
|
|
||||||
user: root
|
user: root
|
||||||
volumes:
|
volumes:
|
||||||
- ${PWD}/compiles:/overleaf/services/clsi/compiles
|
- ${PWD}/compiles:/overleaf/services/clsi/compiles
|
||||||
|
|||||||
@@ -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
|
|
||||||
@@ -39,6 +39,18 @@ COPY libraries/settings/ /overleaf/libraries/settings/
|
|||||||
COPY libraries/stream-utils/ /overleaf/libraries/stream-utils/
|
COPY libraries/stream-utils/ /overleaf/libraries/stream-utils/
|
||||||
COPY services/clsi/ /overleaf/services/clsi/
|
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
|
FROM app
|
||||||
RUN mkdir -p cache compiles output \
|
RUN mkdir -p cache compiles output \
|
||||||
&& chown node:node cache compiles output
|
&& chown node:node cache compiles output
|
||||||
|
|||||||
Reference in New Issue
Block a user