HUB
Sign inSign up
unison logo

immense/unison

By immense

•Updated over 11 years ago

Image
0

305

immense/unison repository overview

⁠Docker-Unison

An extension of https://github.com/leighmcculloch/docker-unison⁠ to support mounting into a docker host.

⁠Usage:

⁠Install Unison Locally

Unison requires the version of the client (running on the host) and server (running in the container, currently at 2.48.3) to match.

⁠Install fswatch Locally
⁠Install coreos-sync Utility
curl -L https://gist.githubusercontent.com/cbankester/0ca3d103a1f5e49b8d37/raw/d9f9e0b3d5bd2e6577894dc2856818f6ca84e6cc/coreos-sync.sh > /usr/local/bin/coreos-sync
chmod +x /usr/local/bin/coreos-sync
⁠Docker

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

docker run -d -p 5000:5000 immense/unison

You can then sync a local folder to /code in the container with with the coreos-sync utility:

coreos-sync ./some-dir some-dir
# this will create the folder /code/some-dir on the docker host

Now you can launch another container with /code/some-dir mounted as a volume:

$ docker run -it -v /code/some-dir:/whatever/you/want /bin/sh
⁠Docker Compose

If you are using the immense/node-baseimage container, you can use the volumes directive in development:

web:
  ...
  volumes:
    - /code/some-dir:/webapp/some-dir

You can then keep the local dir some-dir in sync with the unison container (and by extension, the docker host) with:

coreos-sync ./some-dir some-dir -w

Your web application container will now receive all file changes from your local copy of the application source code.

⁠License

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

Tag summary

Content type

Image

Digest

sha256:384ff3e1b…

Size

147.4 MB

Last updated

over 11 years ago

docker pull immense/unison