|
|
@@ -1,4 +1,3 @@
|
|
|
-# syntax=docker/dockerfile:1-labs
|
|
|
# ---------------------------------------------
|
|
|
# Overleaf Community Edition (overleaf/overleaf)
|
|
|
# ---------------------------------------------
|
|
|
@@ -8,9 +7,13 @@ FROM $OVERLEAF_BASE_TAG
|
|
|
|
|
|
WORKDIR /overleaf
|
|
|
|
|
|
-# Add required source files for yarn install
|
|
|
-# -------------------------------------------
|
|
|
-COPY --parents libraries/*/package.json .yarn/patches/ services/*/package.json tools/migrations/ package.json yarn.lock .yarnrc.yml /overleaf/
|
|
|
+# Add required source files
|
|
|
+# -------------------------
|
|
|
+COPY libraries/ /overleaf/libraries/
|
|
|
+COPY services/ /overleaf/services/
|
|
|
+COPY tools/migrations/ /overleaf/tools/migrations/
|
|
|
+COPY .yarn/patches/ /overleaf/.yarn/patches/
|
|
|
+COPY package.json yarn.lock .yarnrc.yml /overleaf/
|
|
|
COPY server-ce/genScript.js server-ce/services.js /overleaf/
|
|
|
|
|
|
# Pre-install yarn via corepack so it is available at runtime for all users
|
|
|
@@ -23,20 +26,11 @@ ENV COREPACK_ENABLE_NETWORK=0
|
|
|
|
|
|
# Install yarn dependencies
|
|
|
# -------------------------
|
|
|
-RUN --mount=type=cache,target=/root/.cache \
|
|
|
- --mount=type=cache,target=/root/.yarn/berry/cache,id=server-ce-yarn-cache \
|
|
|
- --mount=type=cache,target=/usr/local/share/.cache/yarn,id=server-ce-yarn-fallback-cache \
|
|
|
- --mount=type=tmpfs,target=/tmp node genScript install | bash
|
|
|
+RUN node genScript install | bash
|
|
|
|
|
|
-# Add the actual source files
|
|
|
-# ---------------------------
|
|
|
-COPY --parents libraries/ services/ tools/migrations/ /overleaf/
|
|
|
-RUN --mount=type=cache,target=/root/.cache \
|
|
|
- --mount=type=cache,target=/root/.yarn/berry/cache,id=server-ce-yarn-cache \
|
|
|
- --mount=type=cache,target=/usr/local/share/.cache/yarn,id=server-ce-yarn-fallback-cache \
|
|
|
- --mount=type=cache,target=/overleaf/services/web/node_modules/.cache,id=server-ce-webpack-cache \
|
|
|
- --mount=type=tmpfs,target=/tmp \
|
|
|
- node genScript compile | bash
|
|
|
+# Compile the source files
|
|
|
+# ------------------------
|
|
|
+RUN node genScript compile | bash
|
|
|
|
|
|
# Copy runit service startup scripts to its location
|
|
|
# --------------------------------------------------
|