Skip to content

Instantly share code, notes, and snippets.

Last active October 22, 2020 21:24
Show Gist options
  • Star 13 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save petemcw/d1b8ecfe3e49c80e4bbd to your computer and use it in GitHub Desktop.
Save petemcw/d1b8ecfe3e49c80e4bbd to your computer and use it in GitHub Desktop.
Mac OS X Docker Instructions using Dinghy

Docker Installation

A great way to get Docker running smoothly on OS X is to use the awesome project Dinghy. It is basically:

Docker on OS X with batteries included, aimed at making a more pleasant local development experience. Runs on top of docker-machine.

Some of the benefits are:

  • Faster volume sharing using NFS rather than built-in virtualbox/vmware file shares
  • Filesystem events work on mounted volumes
  • Easy access to running containers using built-in DNS and HTTP proxy

Prerequisites for Mac OS X

Since OS X is Unix-based, you'll need to add some additional pieces of functionality to be able to run Docker on your Mac.

brew tap caskroom/cask
brew update
brew install docker docker-compose
brew cask install virtualbox virtualbox-extension-pack


Install via Homebrew

brew tap codekitchen/dinghy
brew install dinghy

Create the Dinghy VM

The next step is to create the dinghy VM. This creates a VM that is based on VirtualBox and Docker Machine. Please note it will take a few minutes for this command to complete:

dinghy create --provider virtualbox

After a successful VM creation, you'll receive shell output similar to the following:

export DOCKER_HOST=tcp://
export DOCKER_CERT_PATH=/Users/prm/.docker/machine/machines/dinghy

Be sure to add these lines to your ~/.bash_profile or similar file. Also, don't copy/paste the above because these lines change for each specific install.

Upgrade Dinghy

Dinghy and the VM can be upgraded separately.

Upgrade Dinghy:

dinghy halt
brew update
brew upgrade dinghy
dinghy up

Upgrade the Dinghy VM:

dinghy upgrade

Test the Installation

You may now test the installation. An easy way is to run:

docker ps
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment