Bind-mount a host directory into the container.
Section: Containers
Mount a bind volume
bash
bash
docker run -v "$PWD":/app -w /app node:20 npm testExplanation
Good for local dev, compilers, and ad hoc tooling.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Containers