Section 16 - Differences between LXC and Docker
I'm trying to improve my understanding of the differences between LXC containers and Docker containers. Although not essential it would help me to better understand the use-case of each.
- Runs on type 2 hypervisors
- Containers are OSes
From LFS201 Containers Overview
The first flavor of containers was the OS container. This type of container runs an image of an operating system with the ability to run init processes and spawn multiple applications.
- A container run-time manager
- Can operate with type 1 (kernel - Linux) and type 2 (OS - Docker4Mac) hypervisors
- Containers are applications
I'm looking for clarification, on all of it but particularly on the last point. I can understand that the OS vs application phrasing is to help identify the scope of the containers use-case but Docker containers (AFAIK) are still operating system images, albeit as bare bones as possible. They still need to init processes and spawn applications, one possible way of doing this is by the entry point on the containers init
This makes me think that the difference between them has more to do with the methodology and utilisation rather than technical construct. It's common practice in the use of Docker to isolate unique functionality to individual containers and connecting containers when that functionality is required. LXC however is bundling all of these functionalities into a single image. Is that a reasonable interpretation? Are the differences simply optimisation for these different use-cases?
Anything to help me understand the differences between the two would be appreciated.
|Hypervisor||Process that runs a VM|
|Hypervisor - type 1||External to the host OS kernel - Container interfaces directly with host hardware|
|Hypervisor - type 2||Internal to the host OS kernel - An additional program of the OS that interfaces with hardware i.e. KVM|