<commit_before># dinghy

Faster, safer Docker on OS X with Vagrant.

## install

First, install [Homebrew](https://github.com/Homebrew/homebrew) and
[Vagrant](http://vagrantup.com) if you haven't already.

Then:

    $ brew install https://raw.githubusercontent.com/codekitchen/dinghy/latest/dinghy.rb

This will install the Docker client as well, using Homebrew. Dinghy will
use your default Vagrant provider, be it VMWare Fusion or Virtual Box:

    $ dinghy help
    $ dinghy up

Once the VM is up, you'll get instructions to add some Docker-related
environment variables, so that your Docker client can contact the Docker
server inside the VM. I'd suggest adding these to your .bashrc or
equivalent.

Sanity check!

    $ docker run -it redis

## why

As we've begun using Docker more heavily in development on OS X, we've run into
a few issues with the current boot2docker solution. Dinghy builds on
boot2docker, but with some unique features:

1. Dinghy uses NFS for sharing files with the VM, and with the Docker containers
   inside the VM. boot2docker recently added support for sharing all of
   `/Users` into your VM, but VirtualBox native file sharing is extremely
   slow. It increases our Rails application's bootup time by an order of
   magnitude.

1. Dinghy is built on top of Vagrant, which makes Dinghy itself simpler
   and if you already use Vagrant, allows integration with all of your
   current Vagrant tooling.

1. Dinghy supports both VirtualBox and VMWare Fusion (requires the paid Vagrant plugin).

1. Dinghy allows setting VM RAM and CPU parameters dynamically on each startup.

## a note on NFS sharing

Dinghy shares your home directory (`/Users/<you>`) over NFS, using a
private network interface between your host machine and the Dinghy
Vagrant VM. This sharing is done in userspace, as your user, not as root.

Be aware that there isn't a lot of security around NFSv3 file shares.
We've tried to lock things down as much as possible (this NFS daemon
doesn't even listen on other interfaces, for example). We feel that this
flavor of NFS sharing is safer than Vagrant's built-in solution.

## caveats<commit_msg>readme update mentioning ntp sync<commit_after># dinghy

Faster, safer Docker on OS X with Vagrant.

## install

First, install [Homebrew](https://github.com/Homebrew/homebrew) and
[Vagrant](http://vagrantup.com) if you haven't already.

Then:

    $ brew install https://raw.githubusercontent.com/codekitchen/dinghy/latest/dinghy.rb

This will install the Docker client as well, using Homebrew. Dinghy will
use your default Vagrant provider, be it VMWare Fusion or Virtual Box:

    $ dinghy help
    $ dinghy up

Once the VM is up, you'll get instructions to add some Docker-related
environment variables, so that your Docker client can contact the Docker
server inside the VM. I'd suggest adding these to your .bashrc or
equivalent.

Sanity check!

    $ docker run -it redis

## why

As we've begun using Docker more heavily in development on OS X, we've run into
a few issues with the current boot2docker solution. Dinghy builds on
boot2docker, but with some unique features:

1. It uses NFS for sharing files with the VM, and with the Docker containers
   inside the VM. boot2docker recently added support for sharing all of
   `/Users` into your VM, but VirtualBox native file sharing is extremely
   slow. It increases our Rails application's bootup time by an order of
   magnitude.

1. Dinghy is built on top of Vagrant, which makes Dinghy itself simpler
   and if you already use Vagrant, allows integration with all of your
   current Vagrant tooling.

1. Support for both VirtualBox and VMWare Fusion (requires the paid Vagrant plugin).

1. Allow setting VM RAM and CPU parameters dynamically on each startup.

1. With vanilla boot2docker VMs on OS X, the clock will get out of synch
   if your computer sleeps with the VM running. Dinghy attempts to solve
   this issue by forcing an NTP sync every half hour, or when your
   computer wakes up.

## a note on NFS sharing

Dinghy shares your home directory (`/Users/<you>`) over NFS, using a
private network interface between your host machine and the Dinghy
Vagrant VM. This sharing is done in userspace, as your user, not as root.

Be aware that there isn't a lot of security around NFSv3 file shares.
We've tried to lock things down as much as possible (this NFS daemon
doesn't even listen on other interfaces, for example). We feel that this
flavor of NFS sharing is safer than Vagrant's built-in solution.

## caveats
{'fraction_non_alphanumeric': 0.05143487858719647, 'fraction_numerical': 0.003973509933774834, 'mean_word_length': 3.979120879120879, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6008708', 'n_tokens_mistral': 1318, 'n_tokens_neox': 1242, 'n_words': 683}