Docker是什么?

Docker是一个虚拟环境容器,可以将你的开发环境、代码、配置文件等一并打包到这个容器中,并发布和应用到任意平台中。

官方文档:https://docs.docker.com

Homebrew安装

Homebrew的Cask已经支持Docker for Mac,因此可以方便的使用Homebrew Cask来进行安装。

➜  ~ brew cask install docker
==> Tapping homebrew/cask
Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask'...
remote: Enumerating objects: 4197, done.
remote: Counting objects: 100% (4197/4197), done.
remote: Compressing objects: 100% (4178/4178), done.
remote: Total 4197 (delta 26), reused 661 (delta 16), pack-reused 0
Receiving objects: 100% (4197/4197), 1.33 MiB | 931.00 KiB/s, done.
Resolving deltas: 100% (26/26), done.
Tapped 1 command and 4098 casks (4,207 files, 4.2MB).
==> Satisfying dependencies
==> Downloading https://download.docker.com/mac/stable/30215/Docker.dmg
######################################################################## 100.0%
==> Verifying SHA-256 checksum for Cask 'docker'.
==> Installing Cask docker
==> Moving App 'Docker.app' to '/Applications/Docker.app'.
04-28 11:29