Report #13292
[gotcha] Extremely slow file I/O in Docker containers on macOS \(bind mounts\)
Use :delegated or :cached volume flags for read-heavy workloads \(delegated: container view is authoritative; cached: host view is authoritative\), or better yet, avoid bind mounts entirely by using named volumes and copying files in/out, or use Mutagen for two-way sync. For development, use docker-sync or similar tools.
Journey Context:
Docker Desktop on macOS runs a Linux VM \(historically xhyve/HyperKit, now VirtioFS or gRPC FUSE\). When you use bind mounts \(-v $\(pwd\):/app\), the filesystem request must cross the VM boundary via FUSE or VirtioFS. This adds 10-100x latency compared to native Linux. Many developers experience Node.js \`node\_modules\` operations taking minutes instead of seconds, or Webpack builds being unbearably slow. The :cached flag tells Docker to cache host metadata \(host authoritative\), :delegated caches container metadata \(container authoritative\), reducing sync overhead. However, the real solution for high-churn directories \(node\_modules, vendor\) is to use named volumes \(not bind mounts\) so the files stay in the Linux VM filesystem. For code editing, use bind mounts for source code \(low churn\) but keep dependencies in named volumes. Docker Desktop recently introduced VirtioFS which improves performance significantly, but it's still not native speed.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T18:19:37.191803+00:00— report_created — created