[CE/SP] Remove non-production dependencies (#33949)

Some non-production dependencies were bundled in the CE and SP images:
- `lint` was pulled as production dependency by `eslint-plugin`. Moving to peer-dependency, which is the usual strategy, addresses the issue.
- Yarn cache wasn't purged. By adding `/usr/local/share/.cache/yarn` to the mounts we ensure it's also cleaned.

GitOrigin-RevId: f328592c8f8de7193295839578e239a975fe30aa
This commit is contained in:
Miguel Serrano
2026-05-27 15:30:30 +02:00
committed by Copybot
parent d610f404e7
commit 21902e7a55
3 changed files with 9 additions and 4 deletions
+3 -1
View File
@@ -25,6 +25,7 @@ ENV COREPACK_ENABLE_NETWORK=0
# -------------------------
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
# Add the actual source files
@@ -32,9 +33,10 @@ RUN --mount=type=cache,target=/root/.cache \
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 \
YARN_CACHE_FOLDER=/tmp/.yarn-cache node genScript compile | bash
node genScript compile | bash
# Copy runit service startup scripts to its location
# --------------------------------------------------