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.
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:
Check here for more information on the installation.
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:
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:
Docker.appfrom the Applications folder, and make sure it is running. Next open up Terminal.
Docker Quickstart Terminal, which will open a terminal and prepare it for use for Docker commands.
Once the terminal is open type
$ docker run hello-world
If all is well then this should print a welcome message verifying that the installation was successful.