Docker Mac 服务启动问题
今天启动docker之后,发现包这个错:
? ~ docker images
2014/12/11 17:11:06 Get http:///var/run/docker.sock/v1.15/images/json: dial unix /var/run/docker.sock: no such file or directory
于是乎看看 boot2docker 是不是没起来:
? ~ boot2docker up
Waiting for VM and Docker daemon to start...
...........oooo
Started.
Writing /Users/nilyang/.boot2docker/certs/boot2docker-vm/ca.pem
Writing /Users/nilyang/.boot2docker/certs/boot2docker-vm/cert.pem
Writing /Users/nilyang/.boot2docker/certs/boot2docker-vm/key.pem
To connect the Docker client to the Docker daemon, please set:
export DOCKER_HOST=tcp://192.168.59.103:2376
export DOCKER_CERT_PATH=/Users/nilyang/.boot2docker/certs/boot2docker-vm
export DOCKER_TLS_VERIFY=1
好了,算是起来了,不要着急,注意还要export几个环境变量
? ~ export DOCKER_HOST=tcp://192.168.59.103:2376
? ~ export DOCKER_CERT_PATH=/Users/nilyang/.boot2docker/certs/boot2docker-vm
? ~ export DOCKER_TLS_VERIFY=1
然后再看看docker状态
? ~ docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
ubuntu latest 86ce37374f40 2 weeks ago 192.7 MB
centos latest ae0c2d0bdc10 5 weeks ago 224 MB
hello-world latest ef872312fe1b 10 weeks ago 910 B
training/sinatra latest f0f4ab557f95 6 months ago 447 MB
training/postgres latest 258105bea10d 6 months ago 364.6 MB
training/webapp latest 31fa814ba25a 6 months ago 278.8 MB
OK ,至此,docker运行正常了。
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。