Docker / LXC容器是正在运行的应用程序还是内存中的东西? [英] Is a Docker/LXC container a running app or something in-memory?

查看:173
本文介绍了Docker / LXC容器是正在运行的应用程序还是内存中的东西?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚阅读了极好的SO问题,要求 Docker和VM之间有什么区别?。但是,接受的答复让我想要更多的一点。

I just read the excellent SO question asking "What is the difference between Docker and a VM?". However, the accepted answer left me wanting just a wee bit more.

我了解一个容器(Docker / LXC - 使用一些名为 libcontainer 和AuFS的东西,这样几十个,几百个甚至几千个容器可以共享相同的CPU,RAM和磁盘资源。但是,答案仍然没有解释完全什么是容器!

I sort of understand a container (Docker/LXC - I don't get the difference) to use something called libcontainer and AuFS so that dozens, hundreds, even thousands of containers can share the same CPU, RAM and disk resources. But, the answer still doesn't explain exactly what a "container" is!

只是这个<$ c的一个实例的容器$ c> libcontainer 运行?是否使用 libcontainer 的应用程序? Linuxy是像服务/守护进程一样吗?所以我问:

Is a container just an instance of this libcontainer running? Is it an application that uses libcontainer? Is it something Linuxy like a service/daemon process? So I ask:


  • 什么完全是一个容器?

  • 多个容器可以在同一VM /物理内共享的确切的计算/系统资源是什么?

  • Docker / LXC是容器中的管理程序方程?如果没有,Docker,LXC和 libcontainer 之间的关系是什么?

  • What exactly is a "container"?
  • What are the exact computing/system resources multiple containers can share inside the same VM/physical?
  • Is Docker/LXC the "hypervisor" in the container equation? If not, what is the relationship between Docker, LXC and libcontainer?

推荐答案


答案仍然不能解释什么是容器!

the answer still doesn't explain exactly what a "container" is!

容器基本上是一个进程,被隔离,具有所需的所有环境(Web服务器,数据库,CMS,任何软件...)。

A container is basically a process, isolated, with all the environment it needs for its job (a webserver, a database, a CMS, any software...).

容器使用Linux内核命名空间来隔离进程,网络和文件系统。
容器使用进程隔离的概念:文件系统,进程,网络,资源(CPU,内存),日志记录(STDIN ...),外壳隔离。

A container uses Linux kernel namespaces to isolate process, network and filesystems. A container uses the concept of process isolation: filesystem, process, network, resource (CPU, memory),logging (STDIN...), shell isolation.

Docker / LXC - 我没有得到区别

Docker/LXC - I don't get the difference

LXC是一套工具控制容器; Docker是另一套工具(全部捆绑在同一个程序中),它也添加了一个文件格式,使image的内容可以从机器传递到机器。 Docker比LXC更多地谈论。
Docker曾经使用lxc库来控制容器,但是用自己的库替换了... libcontainer。

LXC is a set of tools to control containers; Docker is another set of tools (all bundled into the same program), that also adds a file format so the contents of an 'image' can be passed around from machine to machine. Docker is vastly more talked-about than LXC. Docker used to use the lxc library to control containers, but replaced it with its own library called...libcontainer.


多个容器可以在同一个虚拟机/物理内共享的精确计算/系统资源是什么?

What are the exact computing/system resources multiple containers can share inside the same VM/physical?

同一台机器上的容器将共享CPU ,内存和内核。此外,Docker可以让您选择让他们共享相同的网络。

Containers on the same machine will share CPU, memory and the kernel. Additionally, Docker lets you optionally have them share the same network.


Docker / LXC是容器方程式中的管理程序 p>

Is Docker/LXC the "hypervisor" in the container equation?

Linux内核是真正的管理程序,Docker / LXC正在发送命令来创建和控制容器。

The Linux kernel is the real "hypervisor", and Docker/LXC are sending it commands to create and control containers.

这篇关于Docker / LXC容器是正在运行的应用程序还是内存中的东西?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆