最基本的三個概念
engine
Docker Engine provides the core Docker technology that enables images and containers
可以理解成就是docker的命令image
An image is a filesystem and parameters to use at runtime. It doesn’t have state and never changes.
image的內容是不會變的,如果要改變了內容,那就是一個新的image了,可以push到docker hub上去,基於一個image可以跑多個containercontainer
A container is a running instance of an image. When you ran the command
container的內容是會改變的,內容保存在宿主的硬盤上
image只讀,container可寫
每個image有一個指向parent image的指針,沒有就是base image
docker是基於linux container技術
- cgroups:限制容器的資源使用
- namespace機制:實現容器間的隔離
- chroot:文件系統的隔離
docker與傳統虛擬化技術的區別
- 沒有常駐內存,直接和內核交互,性能幾乎沒有損害
- 幾乎可以在任意平臺上跨平臺遷移