简体   繁体   English

LXC :它来自 linuxcontainers.org 还是 Linux 内核的一部分?

[英]LXC : Is it from linuxcontainers.org or part of Linux kernel?

I want to know about LXC and came across this site: https://linuxcontainers.org/lxc/introduction/ ;我想了解 LXC 并访问了这个站点: https://linuxcontainers.org/lxc/introduction/ : https://linuxcontainers.org/lxc/introduction/ in this site, it talks about LXC , LXD , among others.在这个站点中,它讨论了LXCLXD等。

I am a bit confused, I am under the impression that LXC is a Linux kernel feature, so it should be present in Kernel itself.我有点困惑,我的印象是 LXC 是一个 Linux 内核特性,所以它应该存在于内核本身中。 However, looking at the above site viz: https://linuxcontainers.org/lxc/introduction/ , is this same when we say LXC (the kernel feature)?但是,看看上面的站点,即: https://linuxcontainers.org/lxc/introduction/ ,当我们说 LXC(内核功能)时,这是否相同? Or is LXC provided to the Linux kernel by https://linuxcontainers.org/lxc/introduction/ ?还是 LXC 是通过https://linuxcontainers.org/lxc/introduction/提供给 Linux 内核的?

How can I understand this subtle difference?我如何理解这种微妙的差异?

Most of the core features needed to operate Linux in containers are built into the kernel -- namespaces, control groups, virtual roots, etc. However, to assemble a usable container platform from these features requires a considerable amount of infrastructure.在容器中运行 Linux 所需的大部分核心功能都内置在内核中——命名空间、控制组、虚拟根等。然而,从这些功能中组装一个可用的容器平台需要大量的基础设施。 We need to manage container storage, create network links between containers, control per-container resource usage, etc. User-space programs can, and are, used to provide this infrastructure, and the tooling that goes with it.我们需要管理容器存储、在容器之间创建网络链接、控制每个容器的资源使用等。用户空间程序可以并且已经用于提供这种基础设施以及与之配套的工具。

I have written a series of articles on building a container from scratch that explains some of these issues:我写了一系列关于从头开始构建容器的文章,解释了其中的一些问题:

http://kevinboone.me/containerfromscratch.html http://kevinboone.me/containerfromscratch.html

It's possible in principle to build and connect containers using nothing but the features built into the kernel, and a bunch of shell scripts.原则上可以只使用内核中内置的功能和一堆 shell 脚本来构建和连接容器。 Tools like LXC, Docker, and Podman all use the same kernel features (so far as I know), but they manipulate these features in different ways. LXC、Docker 和 Podman 等工具都使用相同的内核功能(据我所知),但它们以不同的方式操作这些功能。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM