Unison image to sync volumes between host and container bidirectionally
1.9K
2.51.2 (Dockerfile)
2.51.2-1 (Dockerfile)
Bidirectional sync between container volumes and host without the performance compromises.
2 Types of sync:
In order to solve performance issues of directories bind-mounted with osxfs, you need to use docker volumes for large directories. Volumes however are not sync between container and host. There is where this image comes in handy. It allows you to bidirectionally sync volumes and host without affecting performance.
unison:
image: modestcoders/unison:2.51.2
volumes:
- app-vendor:/var/www/html/vendor
- .vendor:/sync/vendor
environment:
- SYNC_SOURCE_BASE_PATH=/sync
- SYNC_DESTINATION_BASE_PATH=/var/www/html
- SYNC_MAX_INOTIFY_WATCHES=60000
privileged: true
volumes:
app-vendor:
One time sync
docker-compose run --rm unison sync -path <path_to_sync>
Continuosly sync
docker-compose run --rm unison watch -path <path_to_sync>
You can configure the following variables in your docker-compose.yml
UNISON_USERUNISON_GROUPUNISON_UIDUNISON_GIDSYNC_SOURCE_BASE_PATHSYNC_DESTINATION_BASE_PATHSYNC_PREFERSYNC_SILENTSYNC_MAX_INOTIFY_WATCHESSYNC_EXTRA_UNISON_PROFILE_OPTSSYNC_NODELETE_SOURCEContent type
Image
Digest
Size
5.8 MB
Last updated
almost 8 years ago
docker pull modestcoders/unison:2.51.2-1