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

Unclear documentation (Readme) #7

Closed evbo closed 7 years ago

evbo commented 8 years ago

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

leighmcculloch commented 8 years ago

You need to replace the <docker> with the IP address of your docker machine. To find out what that is run docker-machine ls and it should show you something like:

NAME      ACTIVE   DRIVER       STATE     URL                         SWARM   DOCKER   ERRORS
default   *        virtualbox   Running   tcp://192.168.99.187:2376           v1.9.1
jesseditson commented 8 years ago

A common use case here would be unison . socket://$(docker-machine ip default):5000/ -auto -batch - you can change "default" to the name of your machine if you are using a different name, this will always pick up the correct IP.

Jehu commented 8 years ago

more questions:

leighmcculloch commented 8 years ago

@Jehu if you use the new beta-docker for mac then you won't need unison for syncing I imagine. Which is fantastic as this docker image was a work around for using docker on Mac and slow file transfers :)

Jehu commented 8 years ago

@leighmcculloch this was my hope also as i installed it. but sadly for real volumes are slower than docker stable (feels like 10% slower, or so...).

btw: without docker-machine it is: unison . socket://localhost:5000/ -auto -batch, because docker needs no VirtualBox anymore.

unison can be installed by homebrew: brew install unison

i hope to resolve my perfomance problems now... ;-)

leighmcculloch commented 7 years ago

@Jehu Thank you, I'm adding notes on how to install unison on Mac to the README in the next version, so hopefully other people will have a better experience. Thanks for sharing how you got it working.