Consistency Options
Docker Bind Mount Consistency Options
Only applies to bind mounts on Docker for Mac/Windows (ignored on Linux - Docker runs natively without VM layer, so bind mounts are already fast and consistent)
Options
consistent
(default) - Perfect sync between host and container. Slowest.cached
- Host is authoritative. Container reads may lag. Good for host → container workflows.delegated
- Container is authoritative. Host reads may lag. Good for container → host workflows.
When to Use
consistent
- When you need guaranteed sync (databases, critical files)cached
- When host writes files that container reads (source code editing)delegated
- When container writes files (builds, npm installs, logs)
Performance impact: delegated
can be 10x faster for heavy write operations from containers.
Consider Alternatives
While these flags still work and can provide performance benefits, Docker has moved toward newer file sharing technologies. For new projects, consider exploring Docker Desktop's current file sharing options in the settings, particularly VirtioFS or synchronized file shares for better performance on macOS.