Docker 1 12新功能探索(2) 新增重大特性

这里写图片描述

Docker版本的1.12,仔细看来确实有了不少的变化,作为一个小版本号的升级能有如此之多的功能更新可能确实会让不少追随者喜出望外。1.12就能如此了,让人不由得好奇docker到2.0的时候是要有多大的变化才会升上去呢?那么就火速来看看1.12到底根之前的版本有哪些差别呢?

内置swarm

这个可能是很多人在等待的一个机能,docker原生态的集群,终于在1.12合体了。

[root@host32 ~]# docker swarm

Usage:  docker swarm COMMAND

Manage Docker Swarm

Options:
      --help   Print usage

Commands:
  init        Initialize a swarm
  join        Join a swarm as a node and/or manager
  join-token  Manage join tokens
  update      Update the swarm
  leave       Leave a swarm

Run 'docker swarm COMMAND --help' for more information on a command.
[root@host32 ~]#
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18

docker node

swarm简单的内置模式可能仍然让你不知所措,但是看到这个新加的部分,聪明的你应该立即知道它的作用了吧。通过具体的node命令来管理swarm模式下docker原生态集群节点,设定/更新/删除/确认节点,无所不能。

[root@host32 ~]# docker node

Usage:  docker node COMMAND

Manage Docker Swarm nodes

Options:
      --help   Print usage

Commands:
  demote      Demote a node from manager in the swarm
  inspect     Display detailed information on one or more nodes
  ls          List nodes in the swarm
  promote     Promote a node to a manager in the swarm
  rm          Remove a node from the swarm
  ps          List tasks running on a node
  update      Update a node

Run 'docker node COMMAND --help' for more information on a command.
[root@host32 ~]#
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20

Docker service

熟悉kubernetes的你应该不需要做太多的解释应该就能理解docker为什么加这个了吧。

[root@host32 ~]# docker service

Usage:  docker service COMMAND

Manage Docker services

Options:
      --help   Print usage

Commands:
  create      Create a new service
  inspect     Display detailed information on one or more services
  ps          List the tasks of a service
  ls          List services
  rm          Remove a service
  scale       Scale one or multiple services
  update      Update a service

Run 'docker service COMMAND --help' for more information on a command.
[root@host32 ~]#
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20

docker deploy

概念略有不同,选择关键字的时候能不能和kubernetes1.3有所区别呢。不知道docker人品的人还以为照着这个版本的最大特点是把kubernetes的东西抄袭了一遍呢。

[root@host32 ~]# docker deploy
"docker deploy" requires exactly 1 argument(s).
See 'docker deploy --help'.

Usage:  docker deploy [OPTIONS] STACK

Create and update a stack from a Distributed Application Bundle (DAB)
[root@host32 ~]
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8

看到此为止,已经恍若在用kubernetes了。时代的趋势就是大家把别人的特长都要做到自家的机能里面麽,完全没有和气生财的觉悟阿。反正在这个技术快速演变的时代,我们已经习惯了写Ansbile的role像写docker-compose一样,为什么不能够接受使用docker的一些机能像使用kubernetes一样呢。平常心。Kubernetes1.3更加明确了docker只是其一种container以降低对特定容器的docker的依赖性,话音未落,docker1.12就已经隐晦地表示它不再需要kubernetes这个舵手的方向指引了,这样的一场撕逼大战就这样如火如荼地展开了。让人都没有心思再看下面的一个新追加的特性plugin了,虽然1.12说这只是一个experimental的特性,但是这个特性也是很多人期待已久的功能,值得研究一下。

[root@host32 ~]# docker plugin

Usage:  docker plugin COMMAND

Manage Docker plugins

Options:
      --help   Print usage

Commands:
  disable     Disable a plugin
  enable      Enable a plugin
  inspect     Inspect a plugin
  install     Install a plugin
  ls          List plugins
  rm          Remove a plugin
  set         Change settings for a plugin
  push        Push a plugin

Run 'docker plugin COMMAND --help' for more information on a command.
[root@host32 ~]#
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21

再分享一下我老师大神的人工智能教程吧。零基础!通俗易懂!风趣幽默!还带黄段子!希望你也加入到我们人工智能的队伍中来!https://blog.csdn.net/jiangjunshow

猜你喜欢

转载自www.cnblogs.com/firsttry/p/10294201.html
今日推荐