WS6: avoid duplicating node_modules into a chown layer

↗ view on GitHub · sloth-ninja · 2026-07-12 · acc82f0c

Replace the trailing 'chown -R node:node /app' (which re-wrote the whole
240 MB npm-ci layer) with per-COPY --chown plus a non-recursive chown of
the still-empty /app before USER node - WORKDIR leaves the directory
root-owned, so npm ci as node needs it handed over first. Image size
1.5 GB -> 1.21 GB; verified: builds, boots with dummy env, /health ok,
runs as node, soffice present.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KsUrp6sw58RCSeqJtx5RH6
Repository Sloth-ninja/JessicaOSS
Author sloth-ninja <ezanahaddis@gmail.com>
Authored
Committed
Parents 3a1513ce
Stats 1 file changed , +10 , -7
Part of WS6: pilot deployment docs, Dockerfile, feedback form

Capture this commit into my fork

Download a Markdown prompt that tells Claude how to port this exact commit into your working tree. Run it via claude -p < capture-commit-acc82f0c.md from inside the repo you want the change in.

⬇ Download capture-commit-acc82f0c.md