Docker Installing Docker on Mac OS X


Example

Requirements: OS X 10.8 “Mountain Lion” or newer required to run Docker.

While the docker binary can run natively on Mac OS X, to build and host containers you need to run a Linux virtual machine on the box.

1.12.0

Since version 1.12 you don't need to have a separate VM to be installed, as Docker can use the native Hypervisor.framework functionality of OSX to start up a small Linux machine to act as backend.

To install docker follow the following steps:

  1. Go to Docker for Mac
  2. Download and run the installer.
  3. Continue through installer with default options and enter your account credentials when requested.

Check here for more information on the installation.

1.11.2

Until version 1.11 the best way to run this Linux VM is to install Docker Toolbox, that installs Docker, VirtualBox and the Linux guest machine.

To install docker toolbox follow the following steps:

  1. Go to Docker Toolbox
  2. Click the link for Mac and run the installer.
  3. Continue through installer with default options and enter your account credentials when requested.

This will install the Docker binaries in /usr/local/bin and update any existing Virtual Box installation. Check here for more information on the installation.

To Verify Installation:

1.12.0
  1. Start Docker.app from the Applications folder, and make sure it is running. Next open up Terminal.
1.11.2
  1. Open the Docker Quickstart Terminal, which will open a terminal and prepare it for use for Docker commands.
  1. Once the terminal is open type

    $ docker run hello-world
    
  2. If all is well then this should print a welcome message verifying that the installation was successful.