docker-unisync

command module
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 3, 2015 License: MIT Imports: 12 Imported by: 0

README

docker-unisync

Build Status

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

  1. Increment the version number in the Makefile
  2. Commit and tag the commit with the same version number with a 'v' prefix (e.g. v0.0.1)
  3. Push to the master branch, Travis will take care of building a releasing a binary.

Documentation

Overview

Command docker-unisync allows syncing of directories to a docker-machine over ssh using unison.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL