Home

Arnaud Marquis edited this page Feb 15, 2018 · 44 revisions

Docker Sync

Introduction under http://docker-sync.io

TOC

Also advanced topics


Installation

Gem Version

gem install docker-sync

For more see installation

Boilerplate / Quickstart

See the boilerplate for a simple, working example :

Usage

  1. Be sure to check the strategies guide to pick the right one for you
  2. Create a docker-sync.yml configuration in your project root, see configuration
  3. Adjust your docker-compose.yml as explained here
  4. start the synchronisation with docker-sync start and let docker-sync run in the background
  5. In a new shell run after you started docker-sync docker-compose up

Alternatively to docker-sync start you can do it all in one step

  1. run docker-sync-stack start to start sync services and docker-compose at the same time

You can now boldly change your code and it will all end up in the app-containers

For cleanup see cleanup

Scripting with docker-sync / scaffolding

If you want to run custom logic right after docker-sync started, use it as a library. Its pretty simple, just se here Scripting with docker sync

Development

You need to customize? In short, check development its fairly simple.

You miss something?

  • You do not like rsync/unison, you do like NFS more? Or you like to try using docker cp instead of the other?
  • You like to use a different watcher as fswatch (cli) or implement your own fsevents?

Please do not start a other, new project like the mentioned alternatives - which do differ basically in exactly that. Rather pick up development and

  • add NFS as a sync strategy and add a "fsevents propagator" as a watch-strategy
  • implement docker cp as a sync strategy
  • implement your own watcher or use a dummy watcher ( disabled ) and use an external one and just run docker-sync sync in your project root

Lets join efforts, finally. Seriously :)

Tests (sync and performance)

See test in the Wiki or checkout the docker-sync-boilerplate

Performance

See performance in the Wiki

So the result: No difference between shared and not shared. That's what we want. And thats faster then anything else.

Other usages with docker-sync

Thanks to

Without the following projects, this project would be empty space and worth nothing. All the credits to them

Contributions

Hell yes. Pull-requests, Feedback, Bug-Issues are very welcome.

Alternatives

See alternatives

License

GPL3ish :)