Setup docker on your mac

There is no native docker support yet, you need virtualbox and boot2docker

Install virtualbox

You can find virtualbox binaries file here: https://www.virtualbox.org/wiki/Downloads

Install boot2docker

You can find boot2docker binaries file here: https://github.com/boot2docker/osx-installer/releases

To start boot2docker you need

init boot2docker environment

$ boot2docker init
```bash

Start boot2docker virtualbox

```bash
$ boot2docker up

Test

You can test docker by run a smallest docker image busybox

On your Mac termnial

You can run

docker run busybox echo "hello word"

SSH into your boot2docker vm

boot2docker ssh

get your boot2docker vm ip address

boot2docker ip

Upgrade boot2docker

boot2docker stop
boot2docker delete
boot2docker download
boot2docker init
boot2docker up

Trouble Shooting

2014/11/30 10:28:50 Get http:///var/run/docker.sock/v1.15/containers/json: dial unix /var/run/docker.sock: no such file or directory

Possible reasons:

  • You didn’t start boot2docker, you can try boot2docker up
  • boot2docker environment didn’t set, you can try $(boot2docker shellinit)
  • To be convienent you can put $(boot2docker shellinit) in your bash.rc or zsh.rc