Skip to content

Instantly share code, notes, and snippets.

@mlf4aiur
Last active August 29, 2015 14:18
Show Gist options
  • Select an option

  • Save mlf4aiur/45f94393cca905635fe4 to your computer and use it in GitHub Desktop.

Select an option

Save mlf4aiur/45f94393cca905635fe4 to your computer and use it in GitHub Desktop.
Setup Docker on OSX

Setup Docker on OSX

Install Homebrew on your laptop

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Install some packages you like

brew update
brew doctor

# Install Cask
brew install caskroom/cask/brew-cask
brew cask update
brew cask doctor

export HOMEBREW_CASK_OPTS="--appdir=/Applications"

# Install Casks
brew cask install virtualbox
brew cask install boot2docker

Initialize virtual machine

boot2docker init --disksize=40000  # boot2docker disk image size (in MB).
boot2docker start

set the environment variables in your shell do the following:

eval "$(boot2docker shellinit)"

Run a command in container

docker run --rm hello-world
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment