Docker on OSX
A cheatsheet by @rstacruz|Refreshed almost 4 years ago.Refresh|View source on Github

You’ll need these:

  • boot2docker - bootstraps a Virtualbox VM to run a docker daemon
  • docker - docker client

Install

Install

$ brew install boot2docker
$ brew install docker
$ boot2docker init

Turning on

Turning on

$ boot2docker start

  Waiting for VM to be started...... Started.
  To connect the Docker client to the Docker daemon, please set:
   
      export DOCKER_HOST=tcp://192.168.59.103:2375

$ export DOCKER_HOST=tcp://192.168.59.103:2375

Try it

Try it

$ docker search ubuntu

$ docker pull ubuntu
$ docker start ubuntu

Turning off

Turning off

$ boot2docker save
# save state to disk