docker-unisync
docker-unisync mounts a specified directory into your Docker Machine and recursively watches that directory for changes. Changed files are copied across to your Docker Machine using Unison.
Files changed on your Docker Machine are copied back to the source folder as well.
At the moment, only Mac OS X is supported due to reliance on the FSEvents API. Once the Go fsnotify library supports recursive directory watching, this may be revisited.
Requirements
- Mac OS X (tested on 10.11 El Capitan but should work with 10.9+)
- Unison 2.48.3
Installation
Install Unison with Homebrew:
brew install unison
Download the latest release binary on the releases page. Currently, only darwin/amd64 binaries (for Mac OS X 10.9+) are available.
Building from source
Install Go 1.5 and install via go get
:
brew install go
go get chinthakagodawita/docker-unisync
Usage
First make sure your Docker Machine is running:
docker-machine up mymachine
Then cd
to the directory you want to sync and run docker-unisync
:
cd /my/sync/dir
docker-unisync mymachine
Alternatively, provide source and destination parameters:
docker-unisync --source=/my/sync/dir --destination=/dir/on/machine mymachine
See docker-unisync --help
for a full list of options.
Building
All dependencies are managed via godep and the Go 1.5 Vendor Experiment.
To build, install godep
, cd
to this directory and run:
export GO15VENDOREXPERIMENT=1
godep restore
make
Releasing
- Increment the version number in the
Makefile
- Commit and tag the commit with the same version number with a 'v' prefix (e.g.
v0.0.1
)
- Push to the
master
branch, Travis will take care of building a releasing a binary.