安裝docker, docker-machine
brew install docker docker-machine
安裝過程中報(bào)了個(gè)錯(cuò),google了也沒什么好的解釋.目前沒解決,mac新手,如果有大神能講解下,不勝感激.安裝virtualBox
wget http://download.virtualbox.org/virtualbox/5.1.12/VirtualBox-5.1.12-112440-OSX.dmg
下載后安裝啟動(dòng)docker
docker-machine create --driver virtualbox default
此過程會(huì)下載鏡像
結(jié)果:
Docker is up and running!
To see how to connect your Docker Client to the Docker Engine running on this virtual machine, run: docker-machine env default
- 執(zhí)行
docker-machine env default
可以查看default所設(shè)定的參數(shù)
export DOCKER_TLS_VERIFY="1"
export DOCKER_HOST="tcp://192.168.99.100:2376"
export DOCKER_CERT_PATH="/Users/cye/.docker/machine/machines/default"
export DOCKER_MACHINE_NAME="default"
# Run this command to configure your shell:
# eval $(docker-machine env default)
執(zhí)行
eval $(docker-machine env default)
將default參數(shù)設(shè)定到shell中(也可以將這行命令放入.bash_profile中,默認(rèn)啟動(dòng)就設(shè)定)docker!
接下來要學(xué)習(xí)使用docker了.