download docker desktop from https://hub.docker.com/editions/community/docker-ce-desktop-mac/
double click
Docker.dmg
filedrag the Docker icon to the application folder
dougle click
Docker.app
to start Dockercheck if the Docker is installed successfully in command line
docker version
docker-compose --version
docker-machine --version
How to solve command not found docker-machine error?
- install Docker Machine
1
2
3base=https://github.com/docker/machine/releases/download/v0.16.0 &&
curl -L $base/docker-machine-$(uname -s)-$(uname -m) >/usr/local/bin/docker-machine &&
chmod +x /usr/local/bin/docker-machine添加镜像加速器
注册阿里云,获取镜像加速器地址。
点击Docker图标,Preferences->Docker Engine,在右侧窗口修改json信息:
1
2
3
4
5
6
7{
"experimental": false,
"features": {
"buildkit": true
},
"registry-mirrors": ["https://14b3r05r.mirror.aliyuncs.com"]
}点击Apply and Restart
输入
docker info
就可以查看是否添加成功。