There are now several different ways to run Docker containers on an Apple Mac. First, there’s an app for that Docker for Mac. Second, there’s command line options, which spin up a VirtualBox virtual machine running boot2docker and run the actual image/container from inside there.
The first option installs and runs like any other OSX app from a .dmg. However it doesn’t really support multiple simultaneous users, which isn’t good if you want to use it for something like CI with Jenkins. The second option has packages for MacPorts and for HomeBrew. Interaction with this is via the docker-machine command, so that, given a machine created with
.dmg
docker-machine create <MACHINE NAME>
you start and setup your environment with
docker-machine start <MACHINE NAME> eval $( docker-machine env <MACHINE NAME> )
Now you can run stuff with the usual docker <COMMAND> syntax.
docker <COMMAND>