mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-01-25 23:11:02 +08:00
translated
This commit is contained in:
parent
60ef2c878d
commit
58076c90b8
@ -1,84 +0,0 @@
|
||||
translating---geekpi
|
||||
|
||||
# Understanding Docker "Container Host" vs. "Container OS" for Linux and Windows Containers
|
||||
|
||||
|
||||
|
||||
Lets explore the relationship between the “Container Host” and the “Container OS” and how they differ between Linux and Windows containers.
|
||||
|
||||
#### Some Definitions:
|
||||
|
||||
* Container Host: Also called the Host OS. The Host OS is the operating system on which the Docker client and Docker daemon run. In the case of Linux and non-Hyper-V containers, the Host OS shares its kernel with running Docker containers. For Hyper-V each container has its own Hyper-V kernel.
|
||||
|
||||
* Container OS: Also called the Base OS. The base OS refers to an image that contains an operating system such as Ubuntu, CentOS, or windowsservercore. Typically, you would build your own image on top of a Base OS image so that you can take utilize parts of the OS. Note that windows containers require a Base OS, while Linux containers do not.
|
||||
|
||||
* Operating System Kernel: The Kernel manages lower level functions such as memory management, file system, network and process scheduling.
|
||||
|
||||
#### Now for some pictures:
|
||||
|
||||
![Linux Containers](http://floydhilton.com/images/2017/03/2017-03-31_14_50_13-Radom%20Learnings,%20Online%20Whiteboard%20for%20Visual%20Collaboration.png)
|
||||
|
||||
In the above example
|
||||
|
||||
* The Host OS is Ubuntu.
|
||||
|
||||
* The Docker Client and the Docker Daemon (together called the Docker Engine) are running on the Host OS.
|
||||
|
||||
* Each container shares the Host OS kernel.
|
||||
|
||||
* CentOS and BusyBox are Linux Base OS images.
|
||||
|
||||
* The “No OS” container demonstrates that you do not NEED a base OS to run a container in Linux. You can create a Docker file that has a base image of [scratch][1]and then runs a binary that uses the kernel directly.
|
||||
|
||||
* Check out [this][2] article for a comparison of Base OS sizes.
|
||||
|
||||
![Windows Containers - Non Hyper-V](http://floydhilton.com/images/2017/03/2017-03-31_15_04_03-Radom%20Learnings,%20Online%20Whiteboard%20for%20Visual%20Collaboration.png)
|
||||
|
||||
In the above example
|
||||
|
||||
* The Host OS is Windows 10 or Windows Server.
|
||||
|
||||
* Each container shares the Host OS kernel.
|
||||
|
||||
* All windows containers require a Base OS of either [nanoserver][3] or [windowsservercore][4].
|
||||
|
||||
![Windows Containers - Hyper-V](http://floydhilton.com/images/2017/03/2017-03-31_15_41_31-Radom%20Learnings,%20Online%20Whiteboard%20for%20Visual%20Collaboration.png)
|
||||
|
||||
In the above example
|
||||
|
||||
* The Host OS is Windows 10 or Windows Server.
|
||||
|
||||
* Each container is hosted in its own light weight Hyper-V VM.
|
||||
|
||||
* Each container uses the kernel inside the Hyper-V VM which provides an extra layer of separation between containers.
|
||||
|
||||
* All windows containers require a Base OS of either [nanoserver][5] or [windowsservercore][6].
|
||||
|
||||
A couple of good links:
|
||||
|
||||
* [About windows containers][7]
|
||||
|
||||
* [Deep dive into the implementation Windows Containers including multiple User Modes and “copy-on-write” to save resources][8]
|
||||
|
||||
* [How Linux containers save resources by using “copy-on-write”][9]
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://floydhilton.com/docker/2017/03/31/Docker-ContainerHost-vs-ContainerOS-Linux-Windows.html
|
||||
|
||||
作者:[Floyd Hilton ][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://floydhilton.com/about/
|
||||
[1]:https://hub.docker.com/_/scratch/
|
||||
[2]:https://www.brianchristner.io/docker-image-base-os-size-comparison/
|
||||
[3]:https://hub.docker.com/r/microsoft/nanoserver/
|
||||
[4]:https://hub.docker.com/r/microsoft/windowsservercore/
|
||||
[5]:https://hub.docker.com/r/microsoft/nanoserver/
|
||||
[6]:https://hub.docker.com/r/microsoft/windowsservercore/
|
||||
[7]:https://docs.microsoft.com/en-us/virtualization/windowscontainers/about/
|
||||
[8]:http://blog.xebia.com/deep-dive-into-windows-server-containers-and-docker-part-2-underlying-implementation-of-windows-server-containers/
|
||||
[9]:https://docs.docker.com/engine/userguide/storagedriver/imagesandcontainers/#the-copy-on-write-strategy
|
@ -0,0 +1,82 @@
|
||||
# 了解用于 Linux 和 Windows 容器的 Docker “容器主机”与“容器操作系统”
|
||||
|
||||
|
||||
|
||||
让我们来探讨一下“容器主机”和“容器操作系统”之间的关系,以及它们在 Linux 和 Windows 容器之间的区别。
|
||||
|
||||
#### 一些定义:
|
||||
|
||||
* 容器主机:也称为主机操作系统。主机操作系统是 Docker 客户端和 Docker 守护程序在其上运行的操作系统。在 Linux 和非 Hyper-V 容器的情况下,主机操作系统与运行中的 Docker 容器共享 内核。对于 Hyper-V,每个容器都有自己的 Hyper-V 内核。
|
||||
|
||||
* 容器操作系统:也被称为基础操作系统。基础操作系统是指包含操作系统如 Ubuntu、CentOS 或 windowsservercore 的镜像。通常情况下,你将在基础操作系统镜像之上构建自己的镜像,以便可以利用部分操作系统。请注意,Windows 容器需要一个基础操作系统,而 Linux 容器不需要。
|
||||
|
||||
* 操作系统内核:内核管理诸如内存、文件系统、网络和进程调度等底层功能。
|
||||
|
||||
#### 这有些图片:
|
||||
|
||||
![Linux Containers](http://floydhilton.com/images/2017/03/2017-03-31_14_50_13-Radom%20Learnings,%20Online%20Whiteboard%20for%20Visual%20Collaboration.png)
|
||||
|
||||
在上面的例子中
|
||||
|
||||
* 主机操作系统是Ubuntu。
|
||||
|
||||
* Docker 客户端和 Docker 守护进程(一起被称为 Docker 引擎)正在主机操作系统上运行。
|
||||
|
||||
* 每个容器共享主机操作系统内核。
|
||||
|
||||
* CentOS 和 BusyBox 是 Linux 基础操作系统镜像。
|
||||
|
||||
“No OS” 容器表明你不需要基础操作系统以在 Linux 中运行一个容器。你可以创建一个含有 [scratch][1] 基础镜像的 Docker 文件,然后运行直接使用内核的二进制文件。
|
||||
|
||||
* 查看[这篇][2]文章来比较基础 OS 的大小。
|
||||
|
||||
![Windows Containers - Non Hyper-V](http://floydhilton.com/images/2017/03/2017-03-31_15_04_03-Radom%20Learnings,%20Online%20Whiteboard%20for%20Visual%20Collaboration.png)
|
||||
|
||||
在上面的例子中
|
||||
|
||||
* 主机操作系统是 Windows 10 或 Windows Server。
|
||||
|
||||
* 每个容器共享主机操作系统内核。
|
||||
|
||||
* 所有 Windows 容器都需要 [nanoserver][3] 或 [windowsservercore][4] 的基础操作系统。
|
||||
|
||||
![Windows Containers - Hyper-V](http://floydhilton.com/images/2017/03/2017-03-31_15_41_31-Radom%20Learnings,%20Online%20Whiteboard%20for%20Visual%20Collaboration.png)
|
||||
|
||||
在上面的例子中
|
||||
|
||||
* 主机操作系统是 Windows 10 或 Windows Server。
|
||||
|
||||
* 每个容器都托管在自己的轻量级 Hyper-V 虚拟机中。
|
||||
|
||||
* 每个容器使用 Hyper-V 虚拟机内的内核,它在容器之间提供额外的分离层。
|
||||
|
||||
* 所有 Windows 容器都需要 [nanoserver][5] 或 [windowsservercore][6] 的基础操作系统。
|
||||
|
||||
几个好的链接:
|
||||
|
||||
* [关于 Windows 容器][7]
|
||||
|
||||
* [深入实现 Windows 容器,包括多用户模式和“写时复制”来节省资源][8]
|
||||
|
||||
* [Linux 容器如何通过使用“写时复制”来节省资源][9]
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://floydhilton.com/docker/2017/03/31/Docker-ContainerHost-vs-ContainerOS-Linux-Windows.html
|
||||
|
||||
作者:[Floyd Hilton ][a]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://floydhilton.com/about/
|
||||
[1]:https://hub.docker.com/_/scratch/
|
||||
[2]:https://www.brianchristner.io/docker-image-base-os-size-comparison/
|
||||
[3]:https://hub.docker.com/r/microsoft/nanoserver/
|
||||
[4]:https://hub.docker.com/r/microsoft/windowsservercore/
|
||||
[5]:https://hub.docker.com/r/microsoft/nanoserver/
|
||||
[6]:https://hub.docker.com/r/microsoft/windowsservercore/
|
||||
[7]:https://docs.microsoft.com/en-us/virtualization/windowscontainers/about/
|
||||
[8]:http://blog.xebia.com/deep-dive-into-windows-server-containers-and-docker-part-2-underlying-implementation-of-windows-server-containers/
|
||||
[9]:https://docs.docker.com/engine/userguide/storagedriver/imagesandcontainers/#the-copy-on-write-strategy
|
Loading…
Reference in New Issue
Block a user