Giter VIP home page Giter VIP logo

docker-image-unison's Introduction

Usage

HINT: The docker images are no longer published on docker hub - only to ghrc.io!

This image is the unison-image for docker-sync and published ghcr.io eugenmayer/unison.

The tags are structured as ghcr.io/eugenmayer/unison:$UNISON_VERSION-$OCAML_VERSION-$ARCH so for example

# this will pull the AMD or ARM version, depending on your current arch
docker pull ghcr.io/eugenmayer/unison:2.52.1-4.12.0

What does it do ?

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 it's done in docker-sync native_osx.

Docker Sync related

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:

Building

You can build your own image using

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.

Or for arm base builds change the image using BASE_IMAGE

docker build --build-arg "BASE_IMAGE=arm64v8/alpine:3.12" --build-arg "OCAML_VERSION=<ocaml-version>" --build-arg "UNISON_VERSION=<unison-version>" -t custom-docker-image-unison .

Build Examples

For example,

docker build --build-arg "OCAML_VERSION=4.12.0" --build-arg "UNISON_VERSION=2.52.1" -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.

Documentation

You can configure how unison runs by using the following ENV variables:

  • UNISON_SRC th unison src - default is /app_sync
  • UNISON_DEST th unison dest - default is /host_sync
  • APP_VOLUME specifies the directory created in the container to store the synced files, /app_sync by default
  • OWNER_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.
  • UNISON_ARGS Pass individual args to unison.
  • UNISON_WATCH_ARGS Pass individual watch args for unison

Credits

  • Big thanks at mickaelperrin for putting hard work into getting this production ready.

License

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.

docker-image-unison's People

Contributors

eugenmayer avatar jparkinson1991 avatar ostrolucky avatar salvatoret avatar seeekr avatar twodrops avatar yosephsa avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.