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?
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
becausefswatch
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
?