leighmcculloch / docker-unison Goto Github PK
View Code? Open in Web Editor NEWA docker data container using Unison for fast folder sync. An alternative to slow boot2docker volumes on OS X.
License: GNU General Public License v3.0
A docker data container using Unison for fast folder sync. An alternative to slow boot2docker volumes on OS X.
License: GNU General Public License v3.0
What does this mean?:
You can then sync a local folder to /unison in the container with:
$ unison . socket://<docker>:5000/ -auto -batch
Can you give an example? I blindly copy and pasted the command and of course I get:
bash: docker: No such file or directory
The image is 500MB. It's just feel wrong that the biggest images I run is an image for unison service.
What are the reason to use phusion/baseimage? How I understood phusion/baseimage image is great for running multipprocess.
Their is very smaller images running unison: https://github.com/onnimonni/docker-unison
Hi,
when I try syncing between my laptop and Rasberry Pi, after the initial connection and the list of changes are decided, the sync fails with
Fatal error: Lost connection with the server
This looks similar to
bcpierce00/unison#32
and
bcpierce00/unison#94
Two questions:
Is it possible to mount multipde separate directories?
I just tried this out and while the initial file sync using unison seems to work, at some point, subsequent ones start to fail due to a lost connection with the server
error:
Contacting server...
Looking for changes
Waiting for changes from server
Reconciling changes
<---- new dir .sass-cache/73518faaa7ed96cd1457d21e3debf149fba1a055
changed ----> _drafts/foo.md
Propagating updates
UNISON 2.48.3 started propagating changes at 18:36:37.74 on 06 May 2015
[BGN] Copying .sass-cache/73518faaa7ed96cd1457d21e3debf149fba1a055 from //fb6abd0fdb11//unison to /Users/brikis98/foo
[BGN] Updating file _drafts/foo.md from /Users/brikis98/foo to //fb6abd0fdb11//unison
Fatal error: Lost connection with the server
4% 00:00 ETAbrikis98-pro:foo
Any idea what's causing that? The container still seems to be running:
brikis98-pro:foo brikis98$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
fb6abd0fdb11 leighmcculloch/unison:latest "/sbin/my_init" 27 minutes ago Up 27 minutes 0.0.0.0:5000->5000/tcp unison-container
Maybe I'm doing all wrong, I don't know, I'm trying to use this project with Dinghy in Mac, with the following docker-compose.yml
project:
build: .
dockerfile: ./Dockerfile.app
expose:
- "9000"
- "9001"
links:
- redis
container_name: app
volumes:
- /Users/roberto.briones/Documents/project:/var/www/project
volumes_from:
- unison
redis:
image: redis:3.0.6
container_name: cache
ports:
- "6379:6379"
webserver:
build: .
dockerfile: ./Dockerfile.nginx
ports:
- "80:80"
- "443:443"
container_name: nginx
links:
- project
volumes:
- ./logs/nginx:/var/log/nginx
volumes_from:
- project:ro
unison:
image: leighmcculloch/unison:latest
environment:
- UNISON_WORKING_DIR=/unison
volumes:
- /unison
ports:
- "5000:5000"
My symfony project is in /Users/roberto.briones/Documents/project
and that's the folder that I want to speed up, I follow the steps in the README but I don't know if my configuration is correct, also maybe this project is instead of using Dinghy, can anyone give me a hand with this?
Hi,
getting:
local$ Warning: No archive files were found for these roots, whose canonical names are:
/.../app/test.pd
//f4b6fa0a348d//unison/app/test.pd
This can happen either
because this is the first time you have synchronized these roots,
or because you have upgraded Unison to a new version with a different
archive format.
Update detection may take a while on this run if the replicas are
large.
Unison will assume that the 'last synchronized state' of both replicas
was completely empty. This means that any files that are different
will be reported as conflicts, and any files that exist only on one
replica will be judged as new and propagated to the other replica.
If the two replicas are identical, then no changes will be reported.
If you see this message repeatedly, it may be because one of your machines
is getting its address from DHCP, which is causing its host name to change
between synchronizations. See the documentation for the UNISONLOCALHOSTNAME
environment variable for advice on how to correct this.
Donations to the Unison project are gratefully accepted:
http://www.cis.upenn.edu/~bcpierce/unison
Any ideas on the solution for this in with the docker image?
Thanks
In mac osx Sierra brew installs unison version 2.48.4 & ocaml 4.0.3. I already tried to change Dockerfile in order to change versions with no success. Probably there is something I miss. How easy is it to have a version of docker-unison image build with these versions?
Thanks for the nice work
at README.md
You could combine it with fswatch to sync automatically when files change:
$ fswatch -o . | xargs -n1 -I{} unison . socket://:5000/ -ignore 'Path .git' -auto -batch
Unison has "-repeat watch" option to sync automatically files.
This option doesn't need fswatch.
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 don't completely understand how to get unison to work at boot time. I'm trying to keep my source folder syncing from local to container. When container starts, it expects the source to be there already. README suggests and my quick test confirms, that upon boot of the container, /unison
is empty and needs to be synced to.
What is the suggested to way to work in this scenario? I feel this is a pretty standard setup.
i try to figure out how to sync /var/www/html from this image.
I use docker-compose with a docker-compose.yml like this:
version: '2'
services:
web:
image: drupaldocker/php:apache
volumes_from:
- unison
ports:
- "8080:80"
links:
- db
depends_on:
- unison
- db
- solr
db:
image: bitnami/mariadb
environment:
MARIADB_DATABASE: drupal
MARIADB_PASSWORD: rootroot
ports:
- "3306:3306"
unison:
image: leighmcculloch/unison
environment:
- UNISON_VERSION=2.48.3
- UNISON_WORKING_DIR=/var/www/html
- WORKDIR=/var/www/html
ports:
- "5000:5000"
solr:
image: mxr576/apachesolr-5.x-drupal-docker
ports:
- 8983:8983
environment:
PARTIAL_SEARCH_ENABLED: 'true'
But after the command
unison /Users/marco/path/to/my/project/www/ socket://localhost:5000/ -ignore 'Path .git' -auto -batch
the /var/www/html inside the web container is empty
hi,
is this project still works?
i ran into problem during sync
Failed: Error in creating directory:
No space left on device [mkdir(/unison/.unison.tmp.3cc49acfc065335c9e57ccd800936d36.unison.tmp/cache/assets/sprockets)]
75% 00:13 ETAFailed [tmp]: Error in creating directory:
No space left on device [mkdir(/unison/.unison.tmp.3cc49acfc065335c9e57ccd800936d36.unison.tmp/cache/assets/sprockets)]
Failed: Error in closing files:
No space left on device
75% 00:13 ETAFailed [spec]: Error in closing files:
No space left on device
Failed: Error in closing files:
No space left on device
75% 00:13 ETAFailed [test]: Error in closing files:
No space left on device
...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.