leighmcculloch / docker-unison

A docker data container using Unison for fast folder sync. An alternative to slow boot2docker volumes on OS X.
GNU General Public License v3.0
167 stars 26 forks source link

Bi-directional sync not working? #16

Open dfee opened 7 years ago

dfee commented 7 years ago

I'm able to bidirectionally sync by running unison . socket://<docker>:5000/ -ignore 'Path .git' -auto -batch

However, that doesn't stay alive (obviously). What does stay alive is fswatch -o . | xargs -n1 -I{} unison . socket://<docker>:5000/ -ignore 'Path .git' -auto -batch because fswatch stays alive.

So, if I create a file on my docker instance, how do I automatically sync it back to my Mac? Do I need to add a custom RUN command to a custom docker-unison Dockerfile to tell it to also fswatch -o . | xargs -n1 -I{} unison . socket://<docker>:5000/ -ignore 'Path .git' -auto -batch?

u007 commented 6 years ago

i think maybe -watch flag?