1.安装Docker:
1.1 brew update
1.2 brew install boot2docker
1.3 boot2docker upgrade
1.4 boot2docker init
1.5 boot2docker up
1.6设置ENV:
export DOCKER_HOST=tcp://192.168.59.103:2376
export DOCKER_CERT_PATH=/Users/wangxigang/.boot2docker/certs/boot2docker-vm
export DOCKER_TLS_VERIFY=1
添加到 .bash_profile 或者 .zshrc, 之后关闭iterm或者source xxx
ok,安装完毕
$ docker pull ubuntu 试试
由于pull官方的register hub可能速度比较慢:
推荐docker.io加速器:
https://dashboard.daocloud.io/mirror
安装完docker之后,也可以安装个docker-compose工具:
brew install docker-compose
参考官方文档:
https://docs.docker.com/installation/mac/
2.卸载docker:
参考:
https://github.com/boot2docker/osx-installer
卸载脚本uninstall.sh: