English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

MacOS Docker Installation

Install using Homebrew

We can use Homebrew to install Docker on macOS.

Homebrew's Cask already supports Docker for Mac, so you can easily use Homebrew Cask to install:

$ brew install --cask --appdir=/Applications docker
==> Creating Caskroom at /usr/local/Caskroom
==> We'll set permissions properly so we won't need sudo in the future
Password:          # Enter macOS password
==> Satisfying dependencies
==> Downloading https://download.docker.com/mac/stable/21090/Docker.dmg
######################################################################## 100.0%
==> Verifying checksum for Cask docker
==> Installing Cask docker
==> Moving App 'Docker.app' to '/Applications/Docker.app'.
🍺  docker was successfully installed!

After loading the Docker app, click Next. You may be prompted for your macOS login password, just enter it. After that, a Docker running prompt window will pop up, and there will also be a small whale icon in the status bar (()).

Manual download and installation

If you need to download manually, please click the following link to download Stable or Edge version of Docker for Mac.

Like other software on macOS, the installation is also very simple, double-click the downloaded .dmg file, then drag the whale icon to the Application folder.

Find the Docker icon in the app and click to run. You may be prompted for the macOS login password, just enter it.

Clicking the whale icon in the top status bar will pop up the operation menu.

Clicking the icon for the first time may display the installation successful interface, click "Got it!" to close this window.

After starting the terminal, you can check the Docker version installed with the command.

$ docker --version
Docker version 17.09.1-ce, build 19e2cf6

Image Acceleration

Due to domestic network issues, the subsequent pulling of Docker images is very slow, and we can configure an accelerator to solve this problem. I use the NetEase mirror address: http://hub-mirror.c.163.com.

Click the Docker for mac application icon in the taskbar -> Preferences... -> Daemon -> Registry mirrors. Fill in the accelerator address in the list. After the modification is complete, click the Apply & Restart button, Docker will restart and apply the configured image address.

After that, we can use the 'docker info' command to check if the configuration is successful.

$ docker info
...
Registry Mirrors:
 http://hub-mirror.c.163.com
Live Restore Enabled: false