Ref: https://learn.cantrill.io/courses/1820301/lectures/41301611
❗💡 For a more detailed introduction to containers, check the Docker Fundamentals Course
OS Virtualization Problems
- “OS virtualization” = correct, full-name for “virtualization”
- i.e. Run multiple OSes on the same physical HW
- ❗ Container virtualization (Containerization) does NOT virtualize OSes

- Disadvantages/problems with large deployments of OS virtualization:
- 👎 OS often takes a lot of space in the VM
- e.g. 4GB disk → usually 60-70% consumed by OS
- 👎 Duplication of resources
- multiple VMs on the same physical host can be running the same OS
- 👎 OS consume lots of system resources = Heavy usage
- every restart, stop & start implies manipulating the entire OS
- 💡 If we just want to use 6 apps in isolated environments, do we need 6 different OSes? Usually not! → Containers offer a better alternative
Containerization = Container Virtualization
- Most popular containerization SW = Docker
- 💡 Many people treat containers and Docker as synonyms, but there's container SW alternatives like Podman
- Architecture: on top of HW, Host OS & Container Engine (Docker Engine)
- Containers run on the engine

- 🔧 Container characteristics:
-
Isolated environments for apps & their RTE (libraries & dependencies)
-
Much of the same isolation as VMs
💡 unless you need a full & isolated OS, give serious thought to containerization
-
‼️ Containers don't run their own OS, they are a process of the Host OS!
- Very lightweight, consume very little memory
- Super fast to start & stop
-
Portable
- Self-contained, always run as expected
-
Dense and tightly packed
- Can run many, many more containers than VMs on the same physical HW
-
Host used for NWing & file I/O → container ports exposed to the host & beyond
- Application stacks can be multi-container
- e.g. DB container + APP container working together
Image Anatomy
- 💡 An EC2 instance is a running copy of its EBS volumes (its virtual disks)
- Boot Volume is used to launch a copy of an OS running in a virtualized environment
- Similar concept for Docker images and containers