{"id":13416301,"url":"https://github.com/leighmcculloch/docker-unison","last_synced_at":"2025-03-14T23:31:35.328Z","repository":{"id":30649804,"uuid":"34205411","full_name":"leighmcculloch/docker-unison","owner":"leighmcculloch","description":"A docker data container using Unison for fast folder sync. An alternative to slow boot2docker volumes on OS X.","archived":true,"fork":false,"pushed_at":"2019-12-08T05:24:17.000Z","size":4957,"stargazers_count":167,"open_issues_count":9,"forks_count":26,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-07-31T21:56:08.456Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leighmcculloch.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-04-19T12:17:36.000Z","updated_at":"2023-06-29T09:30:04.000Z","dependencies_parsed_at":"2022-09-01T13:00:11.876Z","dependency_job_id":null,"html_url":"https://github.com/leighmcculloch/docker-unison","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leighmcculloch%2Fdocker-unison","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leighmcculloch%2Fdocker-unison/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leighmcculloch%2Fdocker-unison/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leighmcculloch%2Fdocker-unison/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leighmcculloch","download_url":"https://codeload.github.com/leighmcculloch/docker-unison/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243663514,"owners_count":20327300,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-30T21:00:56.675Z","updated_at":"2025-03-14T23:31:30.319Z","avatar_url":"https://github.com/leighmcculloch.png","language":"Shell","funding_links":[],"categories":["Container Operations","Volume management and plugins"],"sub_categories":["Volume Management / Data"],"readme":"# Docker-Unison\n\n**This project is no longer maintained. If you would like to take over maintaining, please fork.**\n\nA docker volume container using [Unison](http://www.cis.upenn.edu/~bcpierce/unison/) for fast two-way folder sync. Created as an alternative to [slow boot2docker volumes on OS X](https://github.com/boot2docker/boot2docker/issues/593).\n\nThe docker image is available on Docker Hub: \n[registry.hub.docker.com/u/leighmcculloch/unison/](https://registry.hub.docker.com/u/leighmcculloch/unison/)\n\n## Usage\n\n### Docker\n\nFirst, you can launch a volume container exposing a volume with Unison.\n\n```bash\n$ CID=$(docker run -d -p 5000:5000 -e UNISON_WORKING_DIR=/unison -v /unison leighmcculloch/unison:latest)\n```\n\nYou can then sync a local folder to `/unison` in the container with:\n\n```bash\n$ unison . socket://\u003cdocker\u003e:5000/ -auto -batch\n```\n\nNext, you can launch a container connected with the volume under `/unison`.\n\n```bash\n$ docker run -it --volumes-from $CID ubuntu /bin/sh\n```\n\n### Docker Compose\n\nIf you are using Docker Compose to manage a dev environment, use the `volumes_from` directive.\n\nThe following `docker-compose.yml` would mount the `/unison` folder from the `unison` container inside your `mywebserver` container.\n\n```yaml\nmywebserver:  \n  build: .  \n  volumes_from:  \n    - unison  \nunison:  \n  image: leighmcculloch/unison:latest  \n  environment:  \n    - UNISON_WORKING_DIR=/unison  \n  volumes:\n    - /unison\n  ports:  \n    - \"5000:5000\"\n```\n\nYou can then sync a local folder, using the unison client, to `/unison` in the container with:\n\n```bash\n$ unison . socket://\u003cdocker\u003e:5000/ -ignore 'Path .git' -auto -batch\n```\n\nYou could combine it with fswatch to sync automatically when files change:\n\n```bash\n$ fswatch -o . | xargs -n1 -I{} unison . socket://\u003cdocker\u003e:5000/ -ignore 'Path .git' -auto -batch\n```\n\n## Installing Unison Locally\nUnison requires the version of the client (running on the host) and server (running in the container) to match. \n\n * 2.40.102 (available via `apt-get install unison` on Ubuntu 14.04, 14.10, 15.04) [compiled with ocaml 4.01]\n * 2.48.3 (available via `brew install unison` on Mac OS X) [compiled with ocaml 4.02]\n\n## Available Unison Images\nThis docker repository includes common versions of Unison server compiled with different versions of OCaml. The version you need can be selected by choosing the appropriately tagged image from the docker hub repository. Images are tagged in the format:\n\n```\nVERSION-[unisonUNISON_VERSION[-OCAML_VERSION]]\n```\n\nSupported versions are any combination of the following:  \n\n * Unison 2.40.102 and 2.48.3\n * OCaml 4.01 and 4.02\n\nAdditional versions can be added easily on request. Open an Issue if you need another version.\n\n### Examples\n| Docker Image Tag                                        | Unison     | OCaml   |\n| ------------------------------------------------------- | ---------- | ------- |\n| `leighmcculloch/unison:latest`                          | `2.48.3`   | `4.02`  |\n| `leighmcculloch/unison:latest-unison2.48.3`             | `2.48.3`   | `4.02`  |\n| `leighmcculloch/unison:latest-unison2.48.3-ocaml4.02`   | `2.48.3`   | `4.02`  |\n| `leighmcculloch/unison:latest-unison2.48.3-ocaml4.01`   | `2.48.3`   | `4.01`  |\n| `leighmcculloch/unison:latest-unison2.40.102`           | `2.40.102` | `4.02`  |\n| `leighmcculloch/unison:latest-unison2.40.102-ocaml4.02` | `2.40.102` | `4.02`  |\n| `leighmcculloch/unison:latest-unison2.40.102-ocaml4.01` | `2.40.102` | `4.01`  |\n\n## Installing fswatch Locally\nGet fswatch using `brew install fswatch` on Mac OS X otherwise [download and compile from a release build](http://emcrisostomo.github.io/fswatch/).\n\n## License\nThis docker image is licensed under GPLv3 because Unison is licensed under GPLv3 and is included in the image. See LICENSE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleighmcculloch%2Fdocker-unison","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleighmcculloch%2Fdocker-unison","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleighmcculloch%2Fdocker-unison/lists"}