Docker is a platform for developers and sysadmins to  build, share, and run applications with containers. The use of containers to deploy applications is called containerization. Containers are not new, but their use for easily deploying applications is.

Containerization is increasingly popular because containers are:

  • Flexible: Even the most complex applications can be containerized.
  • Lightweight: Containers leverage and share the host kernel, making them much more efficient in terms of system resources than virtual machines.
  • Portable: You can build locally, deploy to the cloud, and run anywhere.
  • Loosely coupled: Containers are highly self sufficient and encapsulated, allowing you to replace or upgrade one without disrupting others.
  • Scalable: You can increase and automatically distribute container replicas across a datacenter.
  • Secure: Containers apply aggressive constraints and isolations to processes without any configuration required on the part of the user.


  • 灵活: 即使是最复杂的应用程序也可以被封装。
  • 轻量级: 容器利用和共享主机内核,使它们在系统资源方面比虚拟机更高效。
  • 可移植性: 可以在本地构建、部署到云,并在任何地方运行。
  • 松耦合: 容器是高度自给自足和封装的,允许您替换或升级一个容器而不破坏其他容器。
  • 可伸缩: 您可以增加并自动跨数据中心分发容器副本。
  • 安全: 容器对进程应用主动约束和隔离,而不需要用户进行任何配置。

A container runs natively on Linux and shares the kernel of the host machine with other containers. It runs a discrete process, taking no more memory than any other executable, making it lightweight.

By contrast, a virtual machine (VM) runs a full-blown “guest” operating system with virtual access to host resources through a hypervisor. In general, VMs incur a lot of overhead beyond what is being consumed by your application logic.



Container stack example