Application vs. System Containers
Two Philosophies of Containerization
1 Purpose
While all OCI-compliant containers share the same underlying technology, they are often used in two very different ways. This document defines and contrasts the two main philosophies of containerization: application containers, which are designed to run a single process, and system containers, which are designed to simulate a full operating system.
2 What You’ll Accomplish
By the end of this reading, you will be able to:
- Define and provide a use case for an application container.
- Define and provide a use case for a system container.
- Compare the key differences between the two container types.
This reading maps to the following program and course learning outcomes:
- Course Learning Outcomes (CLOs):
- 1. Identify hardware and basic network components: This topic differentiates between the two major approaches to OS-level virtualization.
This exercise develops the following skills, which align with the O*NET SOC Code 15-1232.00 for Computer User Support Specialists.
| Learning Objective | O*NET KSAs | Technologies Used |
|---|---|---|
| Define and contrast container types. | Knowledge: Computers & Electronics Abilities: Category Flexibility, Information Ordering |
Application Container, System Container |
| Identify tools for each container type. | Knowledge: Computers & Electronics Skills: None |
Podman, Docker, Incus, LXC |
3 Application Containers
An application container is the most common type of container. It is designed to package and run a single application or process in an isolated environment. The container lives only as long as that one process is running.
- Philosophy: The container is the application.
- Analogy: An application container is like a disposable kitchen appliance, such as a toaster. It is designed to do one thing (toast bread) and do it well. You don’t try to cook a whole meal inside it. When you are done toasting, you put it away.
- Common Tools: Podman and Docker are the primary tools used to manage application containers.
- Use Case: You want to run a web server. You create a container that contains only the web server software (e.g., Nginx) and your website’s files. The container starts, the Nginx process runs, and if that process ever stops, the container stops with it.
4 System Containers
A system container is designed to look and feel like a lightweight virtual machine. It runs a full operating system environment, complete with an init system (like systemd), multiple running services, user accounts, and networking.
- Philosophy: The container is a lightweight, full-system replacement for a VM.
- Analogy: A system container is like a small, prefabricated cabin. It’s much lighter and easier to set up than a full house (a VM), but it still has all the essential rooms and utilities (kitchen, bathroom, electricity) to live in comfortably.
- Common Tools: Incus (the modern successor to LXD) and LXC (Linux Containers) are the primary tools for managing system containers.
- Use Case: You want to give a developer a full, isolated Ubuntu server environment to work in, but you don’t want the overhead of a full VM. You can launch an Incus Ubuntu container, and they can log into it, install software with
dnforapt, run web and database servers, and treat it almost exactly like a dedicated machine.
5 Comparison Table
| Feature | Application Container (Podman/Docker) | System Container (Incus/LXC) |
|---|---|---|
| Primary Goal | Run a single application/process. | Run a full, multi-process OS environment. |
| Lifecycle | Ephemeral; tied to the application process. | Persistent; runs like a traditional server. |
| Init System | No (the app is PID 1). | Yes (e.g., systemd is PID 1). |
| Management | Managed like a process. | Managed like a VM (start, stop, reboot, log in). |
| Typical Image Size | Small to medium (Megabytes). | Medium to large (Hundreds of MB). |
| Analogy | A disposable appliance. | A lightweight, prefabricated cabin. |
6 Reflect and Review
Now that you have reviewed this document, take a moment to reflect on your learning in your Microsoft Teams Student Notebook:
- 3 key differences between application and system containers.
- 2 popular tools for managing application containers.
- 1 question you still have about when to use a system container instead of a VM.
Answer these questions in your notebook to solidify your understanding:
- You want to run a single, isolated database service. What type of container would be the most appropriate choice?
- What is the key philosophical difference between an application container and a system container?
- Which type of container would have an
initsystem likesystemdrunning inside it? - What is a common tool used for managing system containers?