11
11

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

docker 1.12 key features (swarmkit, overlay2, plugin repo, health check..)

Last updated at Posted at 2016-06-14

Docker Engine v1.12に入りそうな機能の紹介.
1.12リリース時期はwiki参照: https://github.com/docker/docker/wiki

Swarmkit (aka swarm-v2)

https://github.com/docker/docker/pull/23361
https://github.com/docker/docker/pull/23364

Swarmkitをベースとして,Swarmが書きなおされた.
Docker EngineのCLIに統合される.

こういうアーキテクチャになる (画像出典 http://dockone.io/article/1373)
image
image

ちなみにswarmdはswarmkitのテスト用についてくるが,通常のdockerの運用では用いられない.docker engineはswarmkitをライブラリとして用いる.

libkvを介してetcd/consul/zookeeperを使うのではなく,etcdのraftライブラリを直接使うようになる.

CLIはこういう雰囲気 (PR 23364より引用)

    $ docker service create --scale 3 --name redis --update-delay 10s --update-parallelism 1 redis:3.0.6

    69uh57k8o03jtqj9uvmteodbb
    $ docker service tasks redis
    ID                         NAME     SERVICE  IMAGE        LAST STATE          DESIRED STATE  NODE
    3wfqsgxecktpwoyj2zjcrcn4r  redis.1  redis    redis:3.0.6  RUNNING 13 minutes  RUNNING        worker2
    8lcm041z3v80w0gdkczbot0gg  redis.2  redis    redis:3.0.6  RUNNING 13 minutes  RUNNING        worker1
    d48skceeph9lkz4nbttig1z4a  redis.3  redis    redis:3.0.6  RUNNING 12 minutes  RUNNING        manager1

Overlay2

overlayとは別個にoverlay2ドライバが出来た.
inodeを食い潰す問題が解消される.kernel 4.0以上が必要.
https://github.com/docker/docker/pull/22126

Plugin repository

こんな感じ (PR 23446より引用)

$ docker plugin install aragunathan/no-remove
Plugin "aragunathan/no-remove:latest" requested the following privileges:
 - Networking: host
 - Mounting host path: /data
Do you grant the above permissions? [y/N] y
$ docker plugin ls
NAME                	VERSION             ACTIVE
aragunathan/no-remove   latest              true

Healthcheck

Dockerfile中にこんな行を書ける

HEALTHCHECK --interval=5m --timeout=3s \
CMD curl -f http://localhost/ || exit 1

Live restore

dockerdが落ちてもコンテナは生き続ける

その他

11
11
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
11
11

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?