This image is the unison-image for docker-sync and published on eugenmayer/unison.
The image is used by docker-sync by default, unless it is overridden using the configuration option <sync_strategy>_image in docker-sync.yml. The image uses the latest OCaml and Unison versions available at the time of release. Incase other versions needs to be used (which matches the versions used with docker-sync on the host), build a new docker-image-unison image as follows:
docker build --build-arg "OCAML_VERSION=<ocaml-version>" --build-arg "UNISON_VERSION=<unison-version>" -t custom-docker-image-unison .
where ocaml-version
is any OCaml version available as source-code here and unison-version
is any Unison version available as source code here.
For example,
docker build --build-arg "OCAML_VERSION=4.06.1" --build-arg "UNISON_VERSION=2.51.2" -t custom-docker-image-unison .
The configuration in the docker-sync.yml would then be:
unison_image: 'custom-docker-image-unison'
A lot of credits go to mickaelperrin - most of the work has been done by him initially.
This image simply runs an unison server on the internal port 5000
with the specified user/uid. If the user/uid doesn't
exist, it is created/modified on startup.
You can also combine it with OSXFS as its done in docker-sync native_osx.
You can configure how unison runs by using the following ENV variables:
APP_VOLUME
specifies the directory created in the container to store the synced files,/data
by defaultOWNER_UID
specifies the ID of the user on which the unison process run and the owner of the synced files.MAX_INOTIFY_WATCHES
increases the limit of inotify watches if you need to sync folders with lots of files.
- Big thanks at mickaelperrin for putting hard work into getting this production ready.
What the others did, so: This docker image is licensed under GPLv3 because Unison is licensed under GPLv3 and is included in the image. See LICENSE.