← Back to all posts
Environment Setup3 min read

Docker Basics—Installation and Configuration

An introduction to installing Docker on macOS, logging in, verifying the environment, optionally installing Kitematic, and configuring registry mirrors to accelerate image pulls.

Read in Chinese→

Docker Basics—Installation and Configuration

Official installation guide for Mac
Docker installation for Mac on the official website
You can also refer to this guide
Installation tutorial
Step 1: Download
https://hub.docker.com/editions/community/docker-ce-desktop-mac/
Get Docker
Stable
Edge

The Stable version is fully baked and tested, and comes with the latest GA release of Docker.
The Edge version offers cutting edge features and comes with experimental features turned on.

Get Docker Desktop for Mac (Stable)
Get Docker Desktop for Mac (Edge)

There are two versions:
Stable: quarterly release
Edge: monthly release
After downloading docker.dmg
Step 2: Install
Double-click it and follow the standard installation process

Step 3: Open Docker
Double-click the icon to open it successfully

Step 4: Log in
Log in with your Docker ID to begin installing the data
If you do not have an ID, you will need to create one by clicking Sign Up
Once you have logged in successfully, the installation is complete

Step 5: Check the environment
docker -v

Step 6: Install Kitematic (optional)
Install Kitematic
Kitematic is a GUI tool released by Docker that makes working with Docker simpler and more intuitive.
https://github.com/docker/kitematic/releases
https://kitematic.com
Download the Kitematic-0.17.10-Mac.zip version
An important step—registry mirror acceleration
Pulling images from Docker Hub can sometimes be difficult in China. In this case, you can configure a registry mirror. Docker and many Chinese cloud service providers offer registry mirror services in China, such as:

Registry mirror
Registry mirror address
Dedicated acceleration
Other acceleration

Official Docker China mirror
https://registry.docker-cn.com

Docker Hub

DaoCloud mirror
http://f1361db2.m.daocloud.io
Log in to have one assigned by the system
Docker Hub

Azure China mirror
https://dockerhub.azk8s.cn

Docker Hub, GCR, Quay

USTC mirror
https://docker.mirrors.ustc.edu.cn

Docker Hub, GCR, Quay

Alibaba Cloud
https://.mirror.aliyuncs.com
Log in to have one assigned by the system
Docker Hub

Qiniu Cloud
https://reg-mirror.qiniu.com

Docker Hub, GCR, Quay

NetEase Cloud
https://hub-mirror.c.163.com

Docker Hub

Tencent Cloud
https://mirror.ccs.tencentyun.com

Docker Hub

For Mac OS X users
Click the Docker for Mac application icon in the taskbar -> Preferences… -> Daemon -> Registry mirrors. Enter the mirror address https://registry.docker-cn.com in the list.
After making the change, click the Apply&Restart button. Docker will restart and apply the configured registry mirror address. r/kitematic/releases/download/v0.17.10/Kitematic-0.17.10-Mac.zip) version

An Important Step—Registry Mirror Acceleration

Pulling images from Docker Hub can sometimes be difficult in China. In this case, you can configure a registry mirror. Docker and many Chinese cloud service providers offer registry mirror services in China, such as:

Registry mirror Registry mirror address Dedicated acceleration Other acceleration
Official Docker China mirror https://registry.docker-cn.com Docker Hub
DaoCloud mirror http://f1361db2.m.daocloud.io Log in to have one assigned by the system Docker Hub
Azure China mirror https://dockerhub.azk8s.cn Docker Hub, GCR, Quay
USTC mirror https://docker.mirrors.ustc.edu.cn Docker Hub, GCR, Quay
Alibaba Cloud https://.mirror.aliyuncs.com Log in to have one assigned by the system Docker Hub
Qiniu Cloud https://reg-mirror.qiniu.com Docker Hub, GCR, Quay
NetEase Cloud https://hub-mirror.c.163.com Docker Hub
Tencent Cloud https://mirror.ccs.tencentyun.com Docker Hub
  • For Mac OS X users
  • Click the Docker for Mac application icon in the taskbar -> Preferences… -> Daemon -> Registry mirrors. Enter the mirror address https://registry.docker-cn.com in the list.
  • After making the change, click the Apply&Restart button. Docker will restart and apply the configured registry mirror address.
  • [Failed to save externally linked image. The source site may have hotlink protection enabled. It is recommended that you save the image and upload it directly (img-EghncBCs-1583302649574)(/Users/zy/Library/Application Support/typora-user-images/image-20200228162757953.png)]