Public | Automated Build

Last pushed: 3 years ago
Short Description
Short description is empty for this repo.
Full Description


A docker volume container using Unison for fast two-way folder sync. Created as an alternative to slow boot2docker volumes on OS X.



First, you can launch a volume container exposing a volume with Unison.

$ CID=$(docker run -d -p 5000:5000 -e UNISON_VERSION=2.48.3 leighmcculloch/unison)

You can then sync a local folder to /unison in the container with:

$ unison . socket://<docker>:5000/ -auto -batch

Next, you can launch a container connected with the volume under /unison.

$ docker run -it --volumes-from $CID ubuntu /bin/sh

Docker Compose

If you are using Docker Compose to manage a dev environment, use the volumes_from directive.

The following docker-compose.yml would mount the /unison folder from the unison container inside your mywebserver container.

  build: .  
    - unison  
  image: leighmcculloch/unison  
    - UNISON_VERSION=2.48.3  
    - "5000:5000"

You can then sync a local folder, using the unison client, to /unison in the container with:

$ unison . socket://<docker>:5000/ -ignore 'Path .git' -auto -batch

You could combine it with fswatch to sync automatically when files change:

$ fswatch -o . | xargs -n1 -I{} unison . socket://<docker>:5000/ -ignore 'Path .git' -auto -batch

Installing Unison Locally

Unison requires the version of the client (running on the host) and server (running in the container) to match. This docker image includes common versions of Unison server which can be selected with the UNISON_VERSION environment variable.

  • 2.40.102 (available via apt-get install unison on Ubuntu 14.04, 14.10, 15.04)
  • 2.48.3 (available via brew install unison on Mac OS X) [default]

Additional versions can be added easily on request. Open an Issue if you need another version.

Installing fswatch Locally

Get fswatch using brew install fswatch on Mac OS X otherwise download and compile from a release build.


This docker image is licensed under GPLv3 because Unison is licensed under GPLv3 and is included in the image. See LICENSE.

Docker Pull Command
Source Repository