Mac安装dockertoolbox和启动docker

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"



转载于:https://my.oschina.net/ylchou/blog/522381

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值