码迷,mamicode.com
首页 > 系统相关 > 详细

Mac安装dockertoolbox和启动docker

时间:2015-10-27 00:34:00      阅读:296      评论:0      收藏:0      [点我收藏+]

标签:

Mac安装dockertoolbox和启动docker


?  ~

 docker version

Client:

 Version:      1.8.1

 API version:  1.20

 Go version:   go1.4.2

 Git commit:   d12ea79

 Built:        Thu Aug 13 02:49:29 UTC 2015

 OS/Arch:      darwin/amd64

Get http:///var/run/docker.sock/v1.20/version: dial unix /var/run/docker.sock: no such file or directory.

* Are you trying to connect to a TLS-enabled daemon without TLS?

* Is your docker daemon up and running?


需要安装vm

然后再启动,还是报错:


Machine default already exists in VirtualBox.

Starting machine default...

Starting VM...


Started machines may have new IP addresses. You may need to re-run the `docker-machine env` command.

Setting environment variables for machine default...


                        ##         .

                  ## ## ##        ==

               ## ## ## ## ##    ===

           /"""""""""""""""""\___/ ===

      ~~~ {~~ ~~~~ ~~~ ~~~~ ~~~ ~ /  ===- ~~~

           \______ o           __/

             \    \         __/

              \____\_______/



docker is configured to use the default machine with IP 192.168.99.100

For help getting started, check out the docs at https://docs.docker.com


open /Users/ylchou/.docker/machine/machines/default/ca.pem: no such file or directory

bash-3.2$


通过

find / -name ca.pem

可以看到在目录下有ca.pem

/Users/ylchou/.docker/machine/certs/ca.pem

拷贝到/Users/ylchou/.docker/machine/machines/default/目录下

cp /Users/ylchou/.docker/machine/certs/ca.pem /Users/ylchou/.docker/machine/machines/default



再次启动,报错:

docker is configured to use the default machine with IP 192.168.99.100

For help getting started, check out the docs at https://docs.docker.com


open /Users/ylchou/.docker/machine/machines/default/server.pem: no such file or directory


居然可以ping通192.168.99.100

?  default  

ping 192.168.99.100

PING 192.168.99.100 (192.168.99.100): 56 data bytes

64 bytes from 192.168.99.100: icmp_seq=0 ttl=64 time=0.409 ms

64 bytes from 192.168.99.100: icmp_seq=1 ttl=64 time=0.504 ms

64 bytes from 192.168.99.100: icmp_seq=2 ttl=64 time=0.242 ms

64 bytes from 192.168.99.100: icmp_seq=3 ttl=64 time=0.994 ms

^C

--- 192.168.99.100 ping statistics ---

4 packets transmitted, 4 packets received, 0.0% packet loss

round-trip min/avg/max/stddev = 0.242/0.537/0.994/0.280 ms


bash -c "clear && DOCKER_HOST=tcp://192.168.99.100:2376 DOCKER_CERT_PATH=/Users/ylchou/.docker/machine/machines/default DOCKER_TLS_VERIFY=1 /bin/zsh"
bash -c "clear && DOCKER_HOST=tcp://192.168.99.100:2376 DOCKER_CERT_PATH=/Users/ylchou/.docker/machine/machines/default DOCKER_TLS_VERIFY=1 docker exec -it busybox_hehe sh"



Mac安装dockertoolbox和启动docker

标签:

原文地址:http://my.oschina.net/ylchou/blog/522381

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!