文章目录
  1. 1. docker_1.8到docker1.10之间到底发生了什么
    1. 1.1. 1.9的大更新
    2. 1.2. Docker 1.10: New Compose File, Improved Security, Networking And Much More!
    3. 1.3. docker 1.8在实际使用中的问题
    4. 1.4. mac电脑从docker1.8升级到docker1.12
    5. 1.5. 使用docker for mac来取代docker-toobox
      1. 1.5.1. 设置docker for mac 的加速register-mirrors
    6. 1.6. 直接升级boot2docker系统

docker_1.8到docker1.10之间到底发生了什么

本人是菜鸟,表示刚学习了docker1.8,在没有完全摸透的情况下,docker作者又发了1.9,后面又发了1.10,并表示它是一个大版本;
解决了很多安全问题、优化了networking方式和更多的优化和升级。。。。。

1.9的大更新

[1.9更新了什么][1]

  • Multi-host Networking
  • Persistent Storage
  • Docker Swarm 1.0(简单的讲就是docker的集群)

Docker 1.10: New Compose File, Improved Security, Networking And Much More!

  • 引入了很多安全机制,提升了docker系统安全
  • 越来越好的容器网络访问优化(Networking gets even better)
  • Swarm 1.1

这是原文:

We’re pleased to announce Docker 1.10, jam-packed with stuff you’ve been asking for.
It’s now much easier to define and run complex distributed apps with Docker Compose. The power that Compose brought to orchestrating containers is now available for setting up networks and volumes. On your development machine, you can set up your app with multiple network tiers and complex storage configurations, replicating how you might set it up in production. You can then take that same configuration from development, and use it to run your app on CI, on staging, and right through into production. Check out the blog post about the new Compose file to find out more

[1.10原文在这里][2]

docker 1.8在实际使用中的问题

docker1.8在使用中有好多好多莫名奇妙的问题,就是一个字,烦。。。。。。

mac电脑从docker1.8升级到docker1.12

根据官网的介绍,可以直接下载docker for mac,关于docker for mac和之前安装docker中要安装的docker-toobox,下面一张图就可以解释清楚。

![image][image-1]

[下载docker for mac][3]

[如果电脑上已经安装过了docker-toobox请看这里][4]

使用docker for mac来取代docker-toobox

这张图告诉我们为什么要做下面的事:

![image][image-2]

```
samhu@MacBook-Pro ~> env | grep DOCKER 2
DOCKER_HOST=tcp://192.168.59.103:2376
DOCKER_CERT_PATH=/Users/samhu/.boot2docker/certs/boot2docker-vm
DOCKER_TLS_VERIFY=1
samhu@MacBook-Pro ~> unset DOCKER_TLS_VERIFY
samhu@MacBook-Pro ~> env | grep DOCKER
DOCKER_HOST=tcp://192.168.59.103:2376
DOCKER_CERT_PATH=/Users/samhu/.boot2docker/certs/boot2docker-vm
samhu@MacBook-Pro ~> unset DOCKER_CERT_PATH
samhu@MacBook-Pro ~> unset DOCKER_MACHINE_NAME
samhu@MacBook-Pro ~> unset DOCKER_HOST
samhu@MacBook-Pro ~> env | grep DOCKER
samhu@MacBook-Pro ~>
```

做了这些事以后,就不需要virtualBox虚拟机了来支持docker的运行了。。。。。。。。

然后试下:

```
samhu@MacBook-Pro ~> docker run -d -p 80:80 –name webserver nginx 1
Unable to find image ‘nginx:latest’ locally
latest: Pulling from library/nginx
51f5c6a04d83: Downloading [========> ] 8.38 MB/51.36 MB
a3ed95caeb02: Download complete
51d229e136d0: Downloading [============================> ] 11.25 MB/19.83 MB
bcd41daec8cc: Download complete

```

设置docker for mac 的加速register-mirrors

![image][image-3]

直接升级boot2docker系统

boot2docker upgrade

这样还是通过docker-toobox的方式运行docker,同时virtualbox需要打开。。。。。

[1]: https://blog.docker.com/2015/11/docker-1-9-production-ready-swarm-multi-host-networking/
[2]: https://blog.docker.com/2016/02/docker-1-10/
[3]: https://docs.docker.com/docker-for-mac/
[4]: https://docs.docker.com/docker-for-mac/docker-toolbox/

[image-1]: https://docs.docker.com/docker-for-mac/images/docker-for-mac-and-toolbox.png
[image-2]: https://docs.docker.com/docker-for-mac/images/toolbox-install.png
[image-3]: https://raw.githubusercontent.com/huguiqi/blogCode/master/postImg/0007.png

文章目录
  1. 1. docker_1.8到docker1.10之间到底发生了什么
    1. 1.1. 1.9的大更新
    2. 1.2. Docker 1.10: New Compose File, Improved Security, Networking And Much More!
    3. 1.3. docker 1.8在实际使用中的问题
    4. 1.4. mac电脑从docker1.8升级到docker1.12
    5. 1.5. 使用docker for mac来取代docker-toobox
      1. 1.5.1. 设置docker for mac 的加速register-mirrors
    6. 1.6. 直接升级boot2docker系统