| name | docker-no-local-npm |
| description | For docker-Scrape-Web-Page-To-Markdown, installs Node/npm dependencies only inside the Docker image (never npm install on the host); run Docker with sudo; write project documentation (README.md, PROJECT.md, etc.) in English; keep user-facing and in-repo program messages (API errors, script echo output, thrown Error strings, Dockerfile comments) in English. Use when editing package.json, Dockerfile, docs, app code, shell scripts, running the app, debugging containers, or when the user mentions local node_modules, npm install, Docker, or doc/language for this repo. |
docker-Scrape-Web-Page-To-Markdown
Hard rules
-
Do not install project dependencies on the host
- Do not run or recommend
npm install, npm ci, yarn, pnpm install, etc. in the project directory on the host.
- Runtime modules are installed by
Dockerfile via npm install --omit=dev at image build time (under /node_modules in the image).
- Application code is mounted at
/app; Node resolves packages from /node_modules above /app.
-
Prefix Docker commands with sudo
- Use
sudo docker … and sudo docker compose … (including build, up, run, exec, logs, etc.).
- When the agent runs terminal commands for this project, default to
sudo, unless the user explicitly says they are in the docker group and do not want sudo.
Documentation language
- README.md, PROJECT.md, and other repository-facing explanatory documentation (top-level guides, architecture notes meant for contributors) must be written in English.
- When creating or updating those files, use clear, conventional technical English (complete sentences, accurate commands and paths).
- Chat replies to the user may follow the user’s language preference; the repo docs stay English.
Program messages (English only)
In this repository, messages that live in code or scripts must be English, including:
- HTTP API JSON
error / detail strings and similar user-visible responses
throw new Error(...) and other runtime messages intended for operators or API clients
- Shell scripts:
echo / printf output and comments that explain behavior to maintainers
Dockerfile comments
Chat with the user may use another language; do not add non-English strings into the codebase for those items unless the user explicitly requests a localized product.
Workflow when changing dependencies
- Edit
package.json dependencies as needed.
- Rebuild the image:
sudo docker compose build app
- Optional check:
sudo docker compose run --rm app node -e "require('express');require('cheerio');require('turndown');console.log('deps ok')"
(Same idea as npm run docker:verify-deps; add sudo if the script omits it.)
Run and test
- Start:
sudo docker compose up --build (or npm start if it wraps Compose; still use sudo when invoking Docker directly).
- API smoke test:
scripts/self-test.sh with BASE_URL pointing at the service; ensure the stack is up with sudo docker compose up first.
Agent alignment
- If modules appear “missing” on the host, assume the image was not rebuilt—do not suggest host
npm install.
- Example Docker commands in answers or in docs should include
sudo where this project expects it.
- Any new or updated project documentation in the repo: English only, per the section above.
- Any new or updated program messages (API, scripts, errors, Dockerfile comments): English only, per Program messages above.