最基本的三个概念
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与传统虚拟化技术的区别
- 没有常驻内存,直接和内核交互,性能几乎没有损害
- 几乎可以在任意平台上跨平台迁移