LoginSignup
0
0

More than 3 years have passed since last update.

Dockerの基本をまとめてみた

Last updated at Posted at 2020-05-26

基本事項

  • Linuxでのみ作動
  • CLI
  • カーネルをホストと共有
  • インフラ(OS)とアプリケーションを同梱

メリット

  • 起動時間が短い
    = インフラ(=コンテナ)を毎回作りなおすImmutableInfrastructureと相性がいい

ライフサイクル

  • 実行中

  • 停止

    • 異常終了時
    • 正常終了時

    停止状態では再実行が可能
    かつ、停止直前の状態を保持している

  • 破棄

    明示的に破棄しないとディスクに残る

Dockerfile/Docker image/Docker containerの関係

  • Dockerfile ≒ クラス定義書
  • Docker image ≒ クラス定義書から自動生成されたクラス
  • Docker container ≒ 上記のクラスのインスタンス

dockefileToContainer.png

参考

Docker/Kubernetes 実践コンテナ開発入門

0
0
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
0
0