Alternatives to docker sync

Eugen Mayer edited this page Oct 16, 2017 · 14 revisions

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.

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?) Hint: 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

nfs

Performance: In general, at least 3 times slower than rsync, often even more

  • Dinghy (docker-machine only, no docker for mac)
  • dlite (docker-machine only, no docker for mac)
  • dusty (docker-machine only, no docker for mac)