General knowledge
- GRUB (bootloader) runs first when the computer starts (via BIOS/UEFI).
- The bootloader is loaded into RAM and then loads the OS kernel into memory.
- The OS kernel manages hardware access and device drivers.
- The kernel provides a low-level interface (system calls) for programs to use hardware safely.
- Because kernel interfaces are complex, user-friendly interfaces run in user space called shells.
- Two common shell types: GUI shell (desktop environment) and CLI shell (command line like bash).
- The Linux kernel is open-source, powerful, and widely used - especially on servers, cloud, and many devices.
- Many servers around the world run Linux-based systems.
- Docker relies on Linux kernel features (namespaces and cgroups - control groups), so it is tightly coupled with the Linux kernel.
( namespaces isolate what processes see (PID, filesystem, network), while cgroups control how much resources those processes can use. )
Docker
<aside>
💡
Docker makes lightweight containers - small, isolated environments that run apps. Containers share the host’s Linux kernel but have their own user-space (files, shells, processes).
</aside>
- Docker uses Linux features (namespaces and cgroups) to isolate containers.
- Containers share the host kernel (so they’re lighter than full virtual machines).
- Each container has its own user-space: we can run an Ubuntu shell in one and an Debian shell in another.
- On Linux, Docker talks directly to the Linux kernel.