Alternatives¶
This is a list of alternatives grouped by technology. Feel free to add the missing ones.
Docker native¶
Transparent, consistent, dual-sided (host -> container, container -> host) synchronization. Performance is here a trade-off for consistency. Can be 2-100 times slower than nfs and even more as compared with rsync.
- docker-toolbox: virtualBox / fusion VM (horribly slow)
- docker for mac: uses osxfs. See osxfs-caching for optimization ideas. As of October 2017, they aren’t proven to be effective yet.
OSXFS + unison¶
Dedicated container mounts a local directory via osxfs and runs Unison to synchronize this mount with a Docker volume. - docker-magic-sync - docker-sync implements osxfs+unison-based sync when ‘native_osx’ is used as a strategy, being the default since 0.4.x. We use a special technique to achieve better performance, we sync with osxfs but the container still runs at native speed, let’s call it decoupled sync.
Unison¶
Unison runs both on the host and in a Docker container and synchronizes the macOS directory with a Docker container with Unison. osxfs + unison is a preferred alternative, because it’s simpler and more reliable (bad FSEvents performance).
- docker-sync - unison can be used with docker-sync as well as a strategy, just set sync_strategy: unison
- Hodor (should be as fast as rsync?)
Tip
You can choose to use Unison with docker-sync by adding sync_strategy: ‘unison’ to a sync-point too
Rsync¶
Performance: Exactly the performance you would have without shares. Downside: one-way sync.
- docker-sync - rsync can be used with docker-sync as well as a strategy, just set sync_strategy: rsync
- docker-dev-osx (rsync, vbox only) - Hint: If you are happy with docker-machine and virtual box, this is a pretty solid alternative. It has been there for ages and is most probably pretty advanced. For me, it was no choice, since neither i want to stick to VBox nor it has support for docker-for-mac