Docker Tutorial

Docker Installation

How to use Docker

Docker Instance

Docker Container Lifecycle Command

Docker Container Operation Command

Docker Container rootfs Command

Docker Mirror Repository Command

Docker Local Image Management Command

Docker info|version Command

MacOS Docker installation

Install with Homebrew

macOS We can use Homebrew to install Docker.

Homebrew's Cask already supports Docker for Mac, so it's easy to 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 the 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 asked for your macOS login password, you can enter it. After that, a prompt window for Docker running will pop up, and there is also a small whale icon ( ) on the status bar.


Download and install manually

If you need to download manually, please click the following link to download https://docs.docker.com/docker-for-mac/install/

As with other macOS software, installation is very simple, just double-click the downloaded .dmg file and drag the whale icon to the Application folder.

Find the Docker icon from the app and click Run. You may be asked for the macOS login password, just enter it.

Clicking the whale icon in the top status bar brings up the action menu.

The first time you click the icon, you may see the successful installation interface. Click "Got it!" to close this window.

After starting the terminal, the installed Docker version can be checked by the command.

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