Install Docker on Mac
This article gives the steps to install Docker on a Mac using the Docker Toolbox package.
Docker DMG (Option 1) Recommended
This docker native version uses it's own hypervisor (Hyperkit) solution and does not require Virtualbox. It seems a little more GUI friendly. What I do like is how easy it is to add proxy information trhough the gui preferences. Of course it would be better if we never had to be behind a proxy for the rest of our life...
driver: name: docker use_sudo: false
- Launch DMG
- Drag-n-Drop Docker.app to Applications folder
- First be sure you don't have Docker Toolbox environment variables... meaning REMOVE or comment these type of entries in your bash profile
# export DOCKER_CERT_PATH=$HOME/.docker/machine/machines/default # export DOCKER_HOST=tcp://192.168.99.100:2376 # export DOCKER_TLS_VERIFY=1 # export DOCKER_MACHINE_NAME=default
- Then close/reopen terminal or unset etc.
- Browse to the Docker.app and launch for the first time in the /Applications folder.
- Easiest way is to open Spotlight and type Docker
- Go through the setup prompts
- Open the preferences by clicking on the systray Docker icon and selecting preferences
- Customize CPU, Memory, Proxy, File Sharing, Registries and Privacy how you'd like.
Uninstall or Reset
You can easily uninstall or reset (factory defaults) in the preferences window.
Toolbox (Option 2)
- Download DockerToolbox
- Stop Virtualbox
- Launch DockerToolbox-1.x.x.pkg
- Select Continue | Customize | Install
- Select either Docker Quickstart Terminal or Kitematic Management Tool
- Optionally Login/Sign up Docker Hub account
Add Env Vars (Optional)
If you want docker commands to work in your regular terminal and not just when you launch the Docker CLI; then add the following to your ~/.bash_profile
# Docker export DOCKER_CERT_PATH=$HOME/.docker/machine/machines/default export DOCKER_HOST=tcp://192.168.99.100:2376 export DOCKER_TLS_VERIFY=1 export DOCKER_MACHINE_NAME=default