1. Good Ref
關於 LXC
先撇除一般Hypervisor 不談(大家應該都很熟悉了),在了解Docker之前我們應該先來了解,什麼是 LXC (Linux Container)?我們現來看一下他的定義:
LXC (LinuX Containers) provide an isolated operating system environment with its own file system, network, process and block I/O space. A favorite way to describe containers is that they are like “chroot on steroids”, since they provide the file system isolation that chroot jails provide but they go beyond that by also providing an IP address, a separate process domain, user ids and dedicated access to the host’s physical resources (i.e. memory, CPU) which chroot jails do not provide
Why Docker more than LXC
沒錯,一開始Docker也是架設在LXC之上,不過從Docker 0.9版以後,LXC 已經不再是Docker 唯一且預設的執行環境 (請參考:docker drops LXC as default execution environment),Docker 現在支援更多種的"isolation tools"包含:
- DOpenVZ
- systemd-nspawn
- libvirt-lxc
- libvirt-sandbox
- qemu/kvm
- BSD Jails
- Solaris Zones
- chroot
2. Good 2 ref ref2
Credit Diego Elio “Flameeyes” Pettenò |
3. compare ref
LXC virtual environment has no hardware preload emulation. Each virtual environment (an OS or an application) is loaded in a container and executes without any additional overhead and no hardware emulation. This means no penalty from software with limited memory. In the end, LXC will improve the performance of the bare metal as it only bundles the OS/application that is required.
4. Promx linux container
Containers are a lightweight alternative to fully virtualized machines (VMs). They use the kernel of the host system that they run on, instead of emulating a full operating system (OS). This means that containers can access resources on the host system directly.
The runtime costs for containers is low, usually negligible. However, there are some drawbacks that need be considered:
Only Linux distributions can be run in Proxmox Containers. It is not possible to run other operating systems like, for example, FreeBSD or Microsoft Windows inside a container.
For security reasons, access to host resources needs to be restricted. Therefore, containers run in their own separate namespaces. Additionally some syscalls (user space requests to the Linux kernel) are not allowed within containers.
沒有留言:
張貼留言