From b8dc1a7b1613a2eafa8fc89884ae1bbb250d0e31 Mon Sep 17 00:00:00 2001 From: Kang HuaiShuai Date: Wed, 3 Jul 2019 12:22:22 +0800 Subject: [PATCH] Add image Signed-off-by: Kang HuaiShuai --- introduction/what.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/introduction/what.md b/introduction/what.md index 2b5b373..84060c5 100644 --- a/introduction/what.md +++ b/introduction/what.md @@ -6,6 +6,12 @@ Docker 自开源后受到广泛的关注和讨论,至今其 [GitHub 项目](ht Docker 使用 Google 公司推出的 [Go 语言](https://golang.org/) 进行开发实现,基于 Linux 内核的 [cgroup](https://zh.wikipedia.org/wiki/Cgroups),[namespace](https://en.wikipedia.org/wiki/Linux_namespaces),以及 [AUFS](https://en.wikipedia.org/wiki/Aufs) 类的 [Union FS](https://en.wikipedia.org/wiki/Union_mount) 等技术,对进程进行封装隔离,属于 [操作系统层面的虚拟化技术](https://en.wikipedia.org/wiki/Operating-system-level_virtualization)。由于隔离的进程独立于宿主和其它的隔离的进程,因此也称其为容器。最初实现是基于 [LXC](https://linuxcontainers.org/lxc/introduction/),从 0.7 版本以后开始去除 LXC,转而使用自行开发的 [libcontainer](https://github.com/docker/libcontainer),从 1.11 开始,则进一步演进为使用 [runC](https://github.com/opencontainers/runc) 和 [containerd](https://github.com/containerd/containerd)。 +![Docker 架构](https://docs.microsoft.com/en-us/virtualization/windowscontainers/deploy-containers/media/docker-on-linux.png) + +> `runc` 是一个 Linux 命令行工具,用于根据 [OCI容器运行时规范](https://github.com/opencontainers/runtime-spec) 创建和运行容器。 + +> `containerd` 是一个守护程序,它管理容器生命周期,提供了在一个节点上执行容器和管理镜像的最小功能集。 + Docker 在容器的基础上,进行了进一步的封装,从文件系统、网络互联到进程隔离等等,极大的简化了容器的创建和维护。使得 Docker 技术比虚拟机技术更为轻便、快捷。 下面的图片比较了 Docker 和传统虚拟化方式的不同之处。传统虚拟机技术是虚拟出一套硬件后,在其上运行一个完整操作系统,在该系统上再运行所需应用进程;而容器内的应用进程直接运行于宿主的内核,容器内没有自己的内核,而且也没有进行硬件虚拟。因此容器要比传统虚拟机更为轻便。 @@ -14,6 +20,4 @@ Docker 在容器的基础上,进行了进一步的封装,从文件系统、 ![Docker](_images/docker.png) - - [docker-soft]:https://en.wikipedia.org/wiki/Docker_(software)