Interview Prep/Docker/Volumes, storage and data

A shared-NFS bind mount makes the app very slow.

AdvancedScenarioVolumes, storage and data
Answer

Situation read → Metadata-heavy workloads (node_modules, PHP autoload) over NFS or macOS file sharing are slow.

What I'd do →

  1. Keep dependencies inside the container (named volume for node_modules/vendor).
  2. On Docker Desktop use VirtioFS and develop.watch sync.
  3. Tune NFS (nfsvers=4.1, noatime, larger rsize/wsize) for servers.
  4. Measure with fio or strace -c.

Why → Each stat becomes a network round trip.

Interview tip → Local volumes are almost always faster than network mounts.

All Docker questions Roadmap: Docker & containers

More on Volumes, storage and data