# What Is Containerization? Differences and Evolution of Docker, containerd, Podman, and Rocket

> Containerization has become a fundamental technology in modern software development, deployment, and cloud-native architectures. Since Docker popularized containers, the container ecosystem has evolved to include tools and runtimes such as containerd and Podman, while Rocket (rkt) represents an important milestone in the early development of container technologies.  This article introduces the fundamentals of containerization and explores the roles, architectural differences, and evolution of Docker, containerd, Podman, and Rocket. It also examines how Linux containers work and how container technologies integrate with Kubernetes.

- URL: https://lcxlab.com/en/post/what-is-containerization-docker-containerd-podman-rkt
- Author: Miles Hsu
- Published: 2026-11-04
- Category: DevOps
- Tags: Container, Docker, containerd, Podman, Kubernetes, cri-o, Linux
- License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/deed.en)

---

The term "container" has become almost synonymous with Docker. However, when you inspect a Kubernetes node, you may find that Docker Engine is not installed at all. Instead, the node may use containerd or CRI-O as its container runtime. On Fedora, installing Podman with the podman-docker compatibility package even allows you to keep using the familiar docker command.

More interestingly, when Kubernetes 1.24 announced the "removal of Docker", container images built with docker build continued to run just fine. How could this happen? If Docker was removed, why could containers built by Docker still run?

The answer lies in a fundamental distinction: Docker is not the same as containers, and container images are not the same as container runtimes.

1. **What a container is**: how it differs from a VM, and which Linux kernel features provide the isolation
2. **Images and the OCI standards**: why the tools are interchangeable
3. **History**: from chroot, LXC, Docker and rkt to Kubernetes no longer depending on Docker
4. **How Docker, containerd, Podman and rkt differ architecturally**
5. **Container networking** and **container storage**
6. **How containers fit into Kubernetes**, plus GUI and TUI tools

Every command here was run with rootless Podman on Fedora; the `docker` equivalents give much the same results.

---

## What Is a Container?

### Containers vs Virtual Machines

A virtual machine virtualizes an entire computer: a hypervisor hands each VM a slice of the physical CPU, memory and disk, and every VM runs its own kernel and full operating system. VirtualBox[^virtualbox], UTM[^utm] and Proxmox VE[^proxmox] (built on KVM/QEMU[^kvm-qemu]) all work this way, and so does KubeVirt[^kubevirt] on Kubernetes, which wraps each VM in a Pod that runs QEMU. A container **shares the host's kernel**: it is just an ordinary process on the host, isolated by the kernel so it believes it has a machine of its own.

```mermaid
flowchart TB
    subgraph VM["Virtual machines"]
        direction TB
        VA["App A"] --> VOS1["Guest OS + kernel"]
        VB["App B"] --> VOS2["Guest OS + kernel"]
        VOS1 --> HV["Hypervisor"]
        VOS2 --> HV
        HV --> HW1["Hardware"]
    end
    subgraph CT["Containers"]
        direction TB
        CA["App A + libraries"] --> RT["Container runtime"]
        CB["App B + libraries"] --> RT
        RT --> K["Host kernel (shared)"]
        K --> HW2["Hardware"]
    end
```

| | Virtual machine | Container |
|--|--|--|
| Unit of isolation | A whole machine (kernel included) | Processes |
| Start-up time | Tens of seconds to minutes | Milliseconds to seconds |
| Image size | Gigabytes | Megabytes |
| Different OS | Yes (Windows on a Linux host) | No, the host kernel is shared |
| Isolation strength | Strong (hardware virtualization) | Weaker (a kernel bug affects every container) |

That is also why Docker Desktop and Podman Desktop start a small Linux VM on macOS and Windows (Podman calls it `podman machine`): containers need a Linux kernel.

### Three Building Blocks in the Linux Kernel

A container isn't a single feature but a combination of several:

| Feature | Controls | Example |
|--|--|--|
| **Namespaces** | What a process can *see* | Its own PID 1, its own network interfaces, hostname and mount points |
| **cgroups** | How much it can *use* | At most 512 MiB of memory, at most 1.5 CPUs |
| **Union filesystem** (OverlayFS) | A layered filesystem | Many containers share one image, each adding only a thin writable layer |

On top of these, capabilities, seccomp and SELinux / AppArmor restrict what root inside a container is allowed to do.

Let's run an nginx container and look at it:

```bash
podman run -d --name demo-web -p 8080:80 docker.io/library/nginx:alpine
```

**Namespaces**: inside the container nginx is PID 1 and the hostname is the container ID, as if it were a separate machine:

```bash
podman exec demo-web ps
#PID   USER     TIME  COMMAND
#    1 root      0:00 nginx: master process nginx -g daemon off;
#   25 nginx     0:00 nginx: worker process
#   ...

podman exec demo-web hostname
#50cb8224adb7
```

From the host, though, it is just an ordinary process with its own PID. `/proc/<PID>/ns` lists the namespaces the process belongs to; if they differ from the host's, it is isolated:

```bash
PID=$(podman inspect demo-web --format '{{.State.Pid}}')
podman unshare ls -l /proc/$PID/ns
#cgroup -> cgroup:[4026535463]
#ipc -> ipc:[4026535461]
#mnt -> mnt:[4026535464]
#net -> net:[4026533405]
#pid -> pid:[4026535462]
#user -> user:[4026533500]
#uts -> uts:[4026535460]
#...
```

| Namespace | Isolates |
|--|--|
| `pid` | Process IDs; the container can't see the host's other processes |
| `net` | Network interfaces, IPs, routing tables, iptables rules |
| `mnt` | Mount points; the container has its own root directory |
| `uts` | Hostname |
| `ipc` | Inter-process communication (shared memory, message queues) |
| `user` | UID / GID mapping; root in the container isn't root on the host |
| `cgroup` | The visible cgroup hierarchy |

The `user` namespace is what makes rootless containers possible. `podman top` shows users and PIDs both inside the container and on the host:

```bash
podman top demo-web user huser pid hpid
#USER        HUSER       PID         HPID
#root        1000        1           3417733
#nginx       524388      25          3417769
#...
```

`root` in the container is actually UID `1000` (my own account) on the host, and the `nginx` user maps into the UID range `/etc/subuid` assigns to me (`miles:524288:65536`). Even if the container is compromised, the attacker is only an unprivileged user on the host.

**cgroups** limits are set with flags on `run`:

```bash
podman run -d --name limited --memory 256m --cpus 0.5 docker.io/library/nginx:alpine
podman stats --no-stream limited
```

> [!NOTE] A container isn't a VM
> Containers share the host kernel, so anything namespaces don't cover (the kernel itself, parts of `/proc` and `/sys`, the system clock) is still shared. When stronger isolation is needed, runtimes such as gVisor or Kata Containers wrap the container in a sandbox or a lightweight VM.

---

## Images and the OCI Standards

### An Image Is a Stack of Read-Only Layers

An image is a packaged root directory plus start-up configuration (which command to run, environment variables, exposed ports). It consists of layers; every Dockerfile instruction that changes files adds one:

```dockerfile
FROM alpine:3.22          # layer 1: alpine's root directory
RUN apk add --no-cache nginx   # layer 2: only the files added
COPY site/ /usr/share/nginx/html/   # layer 3
CMD ["nginx", "-g", "daemon off;"]   # configuration only, no file layer
```

```bash
podman image inspect docker.io/library/nginx:alpine --format '{{len .RootFS.Layers}} layers'
#8 layers
```

Layers are shared: ten images based on `alpine` store the `alpine` layer on disk once and download it once.

### OCI: A Common Language

In 2015 Docker, CoreOS, Google, Red Hat and others founded the **OCI (Open Container Initiative)** to standardize Docker's image format and how containers are run. There are now three specifications:

| Spec | Defines | Implementations |
|--|--|--|
| **Image Spec** | The image format: manifest, config, layers | Images built by Docker, Podman, Buildah |
| **Runtime Spec** | How to run an unpacked root directory (a bundle) as a container | runc, crun, youki, gVisor's runsc |
| **Distribution Spec** | The registry HTTP API for pushing and pulling | Docker Hub, Harbor, GHCR, Quay |

This is why the tools interoperate: **`docker build` produces an OCI image that Podman, containerd and CRI-O all understand, and Kubernetes can pull it from any compliant registry.** "Kubernetes no longer supports Docker" means it no longer uses the Docker *tool* to run containers, not that it can't run images Docker built.

---

## History: From chroot to Kubernetes Without Docker

| Year | Event |
|--|--|
| 1979 | Unix V7 adds `chroot`, letting a process treat a directory as `/`: the first filesystem isolation |
| 2000 | FreeBSD Jails isolate processes and networking as well as the filesystem |
| 2004 | Solaris Zones |
| 2006–2008 | Google engineers build process containers, renamed **cgroups** and merged into Linux 2.6.24 in 2008 |
| 2002–2013 | Linux gains namespaces one by one (mount first; user namespaces only became complete in 3.8) |
| 2008 | **LXC**: the first complete Linux container tool combining namespaces and cgroups |
| 2013 | dotCloud presents **Docker** at PyCon; images, Dockerfiles and registries make containers easy. Early versions run on LXC |
| 2014 | Docker 0.9 replaces LXC with its own **libcontainer**; Google open-sources **Kubernetes**; CoreOS announces **rkt (Rocket)** and the appc spec, criticizing Docker's daemon architecture and security |
| 2015 | **OCI** is founded and Docker donates libcontainer, which becomes **runc**; Kubernetes 1.0 ships and the **CNCF** is formed |
| 2016 | Docker 1.11 splits out **containerd** and runc, leaving dockerd with the API and higher-level features; Kubernetes 1.5 introduces the **CRI (Container Runtime Interface)** |
| 2017 | containerd and rkt join the CNCF; Red Hat releases **CRI-O** 1.0, a runtime built just for Kubernetes |
| 2019 | **Podman 1.0** is released; containerd graduates from the CNCF; rkt is archived by the CNCF after Red Hat acquired CoreOS and stopped development |
| 2020 | Kubernetes 1.20 deprecates **dockershim** |
| 2021 | Docker Desktop becomes paid for large companies, boosting alternatives such as Podman Desktop and Rancher Desktop |
| 2022 | Kubernetes 1.24 **removes dockershim**; Podman 4 switches to **Netavark**, a network stack written in Rust |
| 2024 | Podman 5 makes **pasta** the default rootless network |
| 2025 | Docker Engine 29 uses the **containerd image store** by default on new installs, handing Docker's own image management to containerd |

### Why Did Kubernetes Stop Depending on Docker?

Kubernetes originally called Docker directly to run containers. To support rkt, the kubelet then grew a second set of rkt-specific code. Every new runtime meant another integration inside the kubelet, so version 1.5 defined the **CRI**: the kubelet speaks only CRI (a gRPC API) and each runtime implements a CRI server.

Docker never implemented CRI. To keep Docker working, the kubelet carried an adapter, **dockershim**, that translated CRI calls into the Docker API. But Docker itself already ran on containerd, so the result looked like this:

```mermaid
flowchart LR
    subgraph Before["Up to 1.23 (with Docker)"]
        direction LR
        K1["kubelet"] --> DS["dockershim<br/>(inside kubelet)"] --> D["dockerd"] --> C1["containerd"] --> R1["runc"]
    end
    subgraph After["1.24 and later"]
        direction LR
        K2["kubelet"] -->|"CRI"| C2["containerd<br/>(built-in CRI plugin)"] --> R2["runc"]
    end
```

dockerd was a detour on this path: Kubernetes used none of its build, Compose or volume features, yet had to maintain the shim and run an extra daemon. So 1.20 deprecated dockershim and 1.24 removed it. Since then nodes mostly run **containerd** or **CRI-O**; to keep using Docker Engine you install **cri-dockerd**, maintained by Mirantis.

The practical impact is small:

- **Images still work**: they're OCI images
- **Developer machines still use Docker**: `docker build` and `docker compose` are unaffected
- **No more `docker ps` on nodes**: use `crictl ps` and `crictl logs`, or containerd's `ctr` / `nerdctl`
- **Pods mounting `/var/run/docker.sock` break**: CI jobs running `docker build` in a Pod need Kaniko, Buildah or BuildKit instead

---

## The Four Projects and Their Architectures

### Docker

Docker is a complete developer toolkit: CLI, builds (BuildKit), image management, networking, volumes and Compose. Today's Docker Engine is itself layered:

```mermaid
flowchart LR
    CLI["docker CLI"] -->|"REST API<br/>/var/run/docker.sock"| D["dockerd"]
    D -->|"gRPC"| C["containerd"]
    C --> S["containerd-shim-runc-v2"]
    S --> R["runc"]
    R --> P["Container process"]
```

On my Fedora machine there are two long-running daemons owned by root:

```bash
ps -eo pid,user,cmd | grep -E 'dockerd|containerd$'
#3415866 root  /usr/bin/containerd
#3415920 root  /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock ...
```

- **dockerd**: serves the Docker API and handles builds, networking, volumes and other high-level features
- **containerd**: manages images and the container lifecycle
- **shim**: one per container, so containers survive a containerd or dockerd restart; it also collects exit codes and forwards stdio
- **runc**: the low-level runtime that actually asks the kernel for namespaces and cgroups; it exits once the container has started

Docker's defining trait is **a daemon running as root**. Access to `docker.sock` equals root access, so adding a user to the `docker` group is effectively giving them sudo. Docker supports a rootless mode too, but it isn't the default.

### containerd

containerd is the **high-level runtime** split out of Docker: it pulls images, manages snapshots (filesystem layers), creates containers and calls runc through a shim. It doesn't build images and has no Compose.

It is the most common Kubernetes runtime and the default in kubeadm setups, k3s, RKE2, EKS, GKE and AKS. There are three CLIs for working with it directly:

| Tool | Purpose |
|--|--|
| `ctr` | containerd's bundled debugging tool; bare-bones, sets up no networking |
| `nerdctl` | A docker-compatible CLI with compose and rootless support |
| `crictl` | Talks to the runtime over CRI; for troubleshooting Kubernetes nodes, works with containerd and CRI-O |

> [!TIP] containerd namespaces
> containerd has its own namespaces (unrelated to Linux namespaces) that separate the resources of different clients: Docker uses `moby`, Kubernetes uses `k8s.io`. If `ctr images ls` shows nothing on a node, add `-n k8s.io`.

### Podman

Podman is a container tool led by Red Hat. Its CLI is nearly identical to Docker's (many people simply `alias docker=podman`), but the architecture differs: **there is no long-running daemon**.

```mermaid
flowchart LR
    CLI["podman CLI"] -->|"fork/exec"| CM["conmon<br/>(one per container)"]
    CM --> R["crun / runc"]
    R --> P["Container process"]
    CLI -.->|"reads/writes"| ST["~/.local/share/containers<br/>(images, container config)"]
```

`podman run` forks **conmon** (the container monitor, similar to containerd's shim), which calls the OCI runtime (on Fedora the default is **crun**, written in C, faster and lighter than runc). In the process tree the container's parent is conmon, and everything runs as my own user:

```bash
ps -eo pid,ppid,user,cmd --forest | grep -E 'conmon|nginx: master'
#3417731    1788 miles  \_ /usr/bin/conmon --api-version 1 -c 50cb8224adb7...
#3417733 3417731 miles  |   \_ nginx: master process nginx -g daemon off;
```

What sets Podman apart:

- **Rootless first**: ordinary users can run containers without a root daemon
- **Pods**: like Kubernetes, several containers can share a network in one Pod, and `podman kube generate` / `podman kube play` convert to and from Kubernetes YAML
- **systemd integration**: **Quadlet** (`.container` files) turns containers into systemd services that start at boot and log to journald
- **Docker-compatible API**: with `podman.socket` enabled, `docker-compose`, lazydocker and VS Code Dev Containers connect to it directly

```bash
systemctl --user enable --now podman.socket
export DOCKER_HOST=unix://$XDG_RUNTIME_DIR/podman/podman.sock
```

Companion tools are **Buildah** (building images) and **Skopeo** (copying and inspecting images between registries without pulling them).

### rkt (Rocket)

rkt was CoreOS's 2014 alternative to Docker. Nearly every idea it pushed was later absorbed by the ecosystem:

| rkt's position | What happened later |
|--|--|
| No long-running root daemon; `rkt run` executes directly | Podman's daemonless architecture |
| An open image spec (appc) instead of one company deciding the format | The OCI Image Spec |
| The **Pod** as the smallest unit of execution | Pods in Kubernetes and Podman |
| Image signature verification | Notary, cosign, sigstore |
| Let systemd manage container processes | Podman's Quadlet |

rkt was the second runtime Kubernetes supported (rktnetes), but once OCI and CRI took shape, containerd and CRI-O matched Kubernetes' needs better. Red Hat acquired CoreOS in 2018 and put its effort into CRI-O and Podman. The CNCF archived rkt in 2019; **don't use it in new projects**, but knowing its story explains why the container ecosystem looks the way it does today.

### Comparison

| | Docker | containerd | Podman | rkt |
|--|--|--|--|--|
| Role | Complete developer tool | Underlying runtime for Kubernetes / Docker | Daemonless Docker alternative | Early Docker alternative (discontinued) |
| Daemon | dockerd + containerd (root) | containerd (root) | None | None |
| Rootless | Supported, not default | Via nerdctl | Default | Partial |
| Low-level runtime | runc | runc (swappable) | crun / runc | Its own stage1 |
| Build | BuildKit | None (pair with BuildKit) | Buildah (built in) | acbuild |
| Compose | `docker compose` | `nerdctl compose` | `podman compose`, or docker-compose via the socket | None |
| Pods | No | Up to Kubernetes | Yes | Yes |
| In Kubernetes | Needs cri-dockerd | Built-in CRI | Not directly (K8s uses CRI-O) | Removed |

---

## Container Networking

Underneath, container networking is exactly what the previous post built by hand: **network namespaces + veth + a bridge + iptables/nftables NAT**.

[Linux Networking Basics: Routing, DNS, and Network Namespaces](https://lcxlab.com/post/linux-networking-basics)

### The Default Bridge Network

Docker creates the `docker0` bridge (`172.17.0.0/16`); rootful Podman creates `podman0` (`10.88.0.0/16`). Each container gets an `eth0` connected to the bridge through a veth pair, and outgoing traffic is SNATed (MASQUERADE) by the host:

```mermaid
flowchart TB
    subgraph Host["Host"]
        direction TB
        subgraph C1["Container A (net ns)"]
            E1["eth0<br/>10.88.0.2"]
        end
        subgraph C2["Container B (net ns)"]
            E2["eth0<br/>10.88.0.3"]
        end
        E1 --- V1["veth"]
        E2 --- V2["veth"]
        V1 --- BR["podman0 bridge<br/>10.88.0.1"]
        V2 --- BR
        BR -->|"NAT"| NIC["Physical NIC"]
    end
    NIC --> NET["External network"]
```

```bash
podman network ls
#NETWORK ID    NAME        DRIVER
#2f259bab93aa  podman      bridge

podman network inspect podman --format '{{.Subnets}}'
#[{{{10.88.0.0 ffff0000}} 10.88.0.1 <nil>}]
```

### Port Mapping

Reaching a container from outside takes `-p hostPort:containerPort`, which is essentially a DNAT rule:

```bash
podman run -d --name demo-web -p 8080:80 docker.io/library/nginx:alpine
curl -s localhost:8080 | head -4
#<!DOCTYPE html>
#<html>
#<head>
#<title>Welcome to nginx!</title>
```

Rootful Docker and Podman add the rules to iptables or nftables (visible with `sudo nft list ruleset`).

> [!WARNING] Docker's ports bypass ufw
> Docker's DNAT rules apply before packets reach the INPUT chain, so a port published with `-p 5432:5432` isn't blocked by ufw (firewalld instead puts docker0 into a separate docker zone, which likewise escapes your existing rules). For services meant only for the local machine, write `-p 127.0.0.1:5432:5432`.

### Rootless Networking

An unprivileged user can't create bridges or change iptables, so rootless containers rely on a user-space program to forward traffic:

| Tool | Notes |
|--|--|
| **slirp4netns** | The earlier approach; implements a whole TCP/IP stack in user space, slower |
| **pasta** (passt) | The default since Podman 5; maps the container's sockets directly onto host sockets, much faster, and the container sees the same IP as the host |
| **RootlessKit** | Used by rootless Docker and nerdctl |

```bash
podman info --format '{{.Host.RootlessNetworkCmd}}'
#pasta
```

### Custom Networks and DNS

On the default network containers can only reach each other by IP. Create your own network and containers **find each other by name**; Podman provides this with aardvark-dns, Docker with its embedded DNS server (`127.0.0.11`):

```bash
podman network create demo-net
podman network inspect demo-net --format '{{range .Subnets}}{{.Subnet}}{{end}} dns={{.DNSEnabled}}'
#10.89.0.0/24 dns=true

podman run -d --name demo-app --network demo-net docker.io/library/nginx:alpine
podman run --rm --network demo-net docker.io/library/nginx:alpine wget -qO- http://demo-app | head -4
#<!DOCTYPE html>
#<html>
#<head>
#<title>Welcome to nginx!</title>
```

Docker Compose creates such a network for every project automatically, which is why `app` can reach the database at `db:5432`.

### Network Modes

| Mode | Flag | Description |
|--|--|--|
| bridge | default | Its own net ns, attached to a bridge |
| host | `--network host` | No isolation; uses the host's interfaces directly. Fastest, but ports can clash |
| none | `--network none` | Only `lo`; no outside access at all |
| container | `--network container:<name>` | Shares another container's net ns, which is exactly how a Kubernetes Pod works |

### Who Implements the Network?

| Tool | Network implementation |
|--|--|
| Docker | libnetwork (built in) |
| Podman 4+ | **Netavark** + aardvark-dns (Rust); older versions used CNI |
| containerd (Kubernetes) | **CNI** plugins: Calico, Cilium, Flannel… |

In Kubernetes, the containers of a Pod share one net ns (held open by a `pause` container), and traffic between Pods is the CNI plugin's job:

[Kubernetes Networking: How Do Pods Communicate?](https://lcxlab.com/post/cni-plugins-for-kubernetes)

---

## Container Storage

### Image Layers + a Writable Layer: OverlayFS

When a container starts, the runtime uses **OverlayFS** to stack the image's read-only layers and put a writable layer belonging to that container on top:

```mermaid
flowchart TB
    M["merged: the / the container sees"]
    U["upperdir: writable layer (per container, gone when the container is removed)"]
    L3["lowerdir: image layer 3 (read-only)"]
    L2["lowerdir: image layer 2 (read-only)"]
    L1["lowerdir: image layer 1 (read-only)"]
    M --- U --- L3 --- L2 --- L1
```

- **Reading** a file searches from the top down; the first match wins
- **Modifying** a file copies it up into upperdir first (copy-on-write)
- **Deleting** a file places a whiteout marker in upperdir that hides the lower copy

```bash
podman inspect demo-web --format '{{.GraphDriver.Name}}'
#overlay
```

This leads to the most important fact about container storage: **a container's writable layer is temporary**. After `podman rm`, everything written inside the container is gone; even before that, writes to the writable layer are slower. Data you want to keep belongs in a volume or a bind mount.

### Three Ways to Mount

| Type | Syntax | Where the data lives | Good for |
|--|--|--|--|
| **Volume** | `-v demo-data:/data` | A directory managed by the runtime | Databases, data that must persist |
| **Bind mount** | `-v ./site:/usr/share/nginx/html` | A host path you choose | Mounting source code or config during development |
| **tmpfs** | `--tmpfs /tmp` | Memory | Scratch space, secrets that shouldn't touch disk |

A volume's data survives the container:

```bash
podman volume create demo-data
podman run --rm -v demo-data:/data docker.io/library/nginx:alpine sh -c 'echo hello > /data/msg'
podman run --rm -v demo-data:/data docker.io/library/nginx:alpine cat /data/msg
#hello

podman volume inspect demo-data --format '{{.Mountpoint}}'
#/home/miles/.local/share/containers/storage/volumes/demo-data/_data
```

### Where the Data Lives

| | Images and containers | Configuration |
|--|--|--|
| Docker | `/var/lib/docker` (`/var/lib/containerd` with the containerd image store) | `/etc/docker/daemon.json` |
| containerd | `/var/lib/containerd` | `/etc/containerd/config.toml` |
| Podman (rootful) | `/var/lib/containers/storage` | `/etc/containers/storage.conf` |
| Podman (rootless) | `~/.local/share/containers/storage` | `~/.config/containers/storage.conf` |

Note that rootless and rootful Podman keep **two separate stores**: images pulled with `sudo podman` don't show up in your own `podman images`.

Disk usage and cleanup:

```bash
podman system df
#TYPE           TOTAL       ACTIVE      SIZE        RECLAIMABLE
#Images         235         36          11.26GB     10.16GB (90%)
#Containers     4           3           644.8kB     12.89kB (2%)
#Local Volumes  5           1           253.2MB     156.3MB (62%)

podman image prune        # remove untagged (<none>) images
podman system prune -a    # remove all unused images, containers and networks (not volumes)
```

> [!TIP] Bind mounts and SELinux on Fedora / RHEL
> On systems with SELinux enabled, directories bind-mounted into a container often give `Permission denied`. Append `:Z` (private to this container) or `:z` (shared between containers) so Podman relabels them: `-v ./site:/usr/share/nginx/html:Z`. Never do this on system directories such as `/home` or `/etc`; it relabels the whole tree.

### Storage in Kubernetes

Kubernetes keeps the same idea: a container's filesystem is temporary, and persistence comes from mounting volumes. The difference is that Pods move between nodes, so data usually lives on network storage mounted by a **CSI (Container Storage Interface)** driver, requested through the PV, PVC and StorageClass abstractions. Like CRI and CNI, CSI is a standard interface through which Kubernetes hands the implementation to someone else.

---

## Containers and Kubernetes

Putting it together, this is the path a Pod takes on a Kubernetes node:

```mermaid
flowchart LR
    API["kube-apiserver"] --> KL["kubelet"]
    KL -->|"CRI (gRPC)"| RT["containerd / CRI-O"]
    RT -->|"OCI Runtime Spec"| LL["runc / crun"]
    RT -->|"CNI"| NET["Calico / Cilium / Flannel"]
    KL -->|"CSI"| ST["Storage driver"]
    LL --> K["Linux kernel<br/>namespaces / cgroups"]
```

These three `*I` interfaces, together with the OCI specs, mean Kubernetes implements almost none of the container, network or storage details itself:

| Interface | Makes swappable |
|--|--|
| **CRI** | The container runtime: containerd, CRI-O |
| **CNI** | Networking: Calico, Cilium, Flannel |
| **CSI** | Storage: cloud disks, Ceph, NFS, Longhorn |
| **OCI** | Image format and low-level runtime: runc, crun, gVisor, Kata |

On a node, troubleshoot with `crictl`, whose commands resemble docker's:

```bash
sudo crictl ps                 # running containers
sudo crictl pods               # Pods (sandboxes)
sudo crictl logs <container ID>
sudo crictl images
```

Installing containerd and setting `SystemdCgroup = true` when building a cluster with kubeadm is exactly this layer:

[Building a kubeadm Cluster](https://lcxlab.com/post/cka-kubeadm-cluster)

---

## GUI and TUI Tools

Once the commands are familiar, a GUI or TUI that shows every container, its logs and resource usage at a glance is still handy for troubleshooting.

### Podman Desktop

Podman Desktop is Podman's official desktop app (it also supports Docker, Kind and Minikube). On Linux it connects to the local Podman; on macOS and Windows it creates and manages a `podman machine` for you.

<!-- Screenshot: Podman Desktop's Containers list (demo-web, demo-app) -->
![160931](https://lcxlab.com/images/posts/what-is-containerization-docker-containerd-podman-rkt/160931-1.webp)

Beyond managing containers, images, volumes and Pods, the most useful features are:

- Logs, a terminal and inspect output for a container on one screen
- Creating Pods from Compose files or Kubernetes YAML
- Creating Kind / Minikube clusters through extensions and pushing local images straight into them

<!-- Screenshot: Podman Desktop's container detail page (Logs / Terminal tabs) -->
![161815](https://lcxlab.com/images/posts/what-is-containerization-docker-containerd-podman-rkt/161815.webp)

### lazydocker

lazydocker is a terminal UI that shines when you're SSHed into a server. It speaks the Docker API, so point it at Podman's socket first:

```bash
systemctl --user enable --now podman.socket
DOCKER_HOST=unix://$XDG_RUNTIME_DIR/podman/podman.sock lazydocker
```

<!-- Screenshot: lazydocker's main screen (containers on the left, logs / stats on the right) -->
![161600](https://lcxlab.com/images/posts/what-is-containerization-docker-containerd-podman-rkt/161600.webp)

Handy keys: `[` `]` switch the right-hand tabs (Logs, Stats, Config), `d` removes, `r` restarts, `s` stops, `E` opens a shell in the container, and `x` lists every available action.

### OrbStack (macOS)

[OrbStack](https://orbstack.dev/) is a Docker Desktop alternative for macOS. It still runs containers inside a lightweight Linux VM behind the scenes (macOS has no Linux kernel), but it starts in seconds, uses noticeably less CPU, memory and battery, and the `docker` CLI and Compose work out of the box. Besides containers, it can create full Linux machines (Ubuntu, Fedora, Arch and others) and a single-node Kubernetes cluster.

![OrbStack download page](https://lcxlab.com/images/posts/what-is-containerization-docker-containerd-podman-rkt/orbstack-download.webp)

Install it with Homebrew; it supports both Apple Silicon and Intel, requires macOS 14.0+, and is free for personal use (commercial use needs a paid license):

```bash
brew install orbstack
```

I haven't used it myself yet; it's on my list for the next time I'm on a Mac. Issues and the changelog are tracked on [GitHub](https://github.com/orbstack/orbstack).

---

## Which One Should You Use?

- **Developer machine**: if you're used to the Docker ecosystem (Docker Desktop, Compose, countless tutorials), use Docker; on Fedora / RHEL, or if rootless operation and licensing matter, use Podman. With `podman.socket` there are almost no compatibility issues
- **A few services on a server**: Podman + Quadlet makes containers ordinary systemd services with no extra daemon
- **Kubernetes nodes**: containerd (the default in most distributions) or CRI-O (OpenShift); no Docker needed
- **rkt**: no longer maintained; it's enough to know its place in history

The one thing to remember: **images follow the OCI standard, so what you build anywhere runs anywhere**; you're only choosing the tool that manages them.

When you're done, clean up what this post created:

```bash
podman rm -f demo-web demo-app limited
podman network rm demo-net
podman volume rm demo-data
```

[^virtualbox]: VirtualBox: Oracle's free, cross-platform VM software. Install it on Windows, macOS or Linux and you can start creating VMs; it is a Type 2 hypervisor that runs on top of the host operating system, and the most common starting point. [VirtualBox](https://www.virtualbox.org/)

[^utm]: UTM: A VM tool for macOS (and iOS). It is a graphical front end: for same-architecture guests it uses Apple's Virtualization framework, and for cross-architecture guests (such as x86 on Apple Silicon) it falls back to QEMU emulation, which is much slower. [UTM](https://mac.getutm.app/)

[^proxmox]: Proxmox VE: An open-source, Debian-based server virtualization platform installed directly on bare metal and managed through a web UI. It supports both KVM virtual machines and LXC containers, and is a popular homelab choice. [Proxmox VE](https://www.proxmox.com/en/products/proxmox-virtual-environment/overview)

[^kvm-qemu]: KVM / QEMU: KVM is a virtualization module built into the Linux kernel that turns the kernel itself into a hypervisor; QEMU emulates peripheral devices such as disks and network cards. Together they are the mainstream virtualization stack on Linux, and libvirt, virt-manager and Proxmox VE are all built on top of them. [KVM](https://linux-kvm.org/) / [QEMU](https://www.qemu.org/)

[^kubevirt]: KubeVirt: A CNCF project that lets Kubernetes manage VMs. Each VM maps to a `virt-launcher` Pod running libvirt + QEMU, so you manage VMs with YAML and `kubectl`, sharing the same networking and storage as your containers. I use it on my Talos cluster to run an Arch workstation VM. [KubeVirt](https://kubevirt.io/)

---

References

1. [Open Container Initiative](https://opencontainers.org/)
2. [Kubernetes is Moving on From Dockershim: Commitments and Next Steps](https://kubernetes.io/blog/2022/01/07/kubernetes-is-moving-on-from-dockershim/)
3. [Don't Panic: Kubernetes and Docker](https://kubernetes.io/blog/2020/12/02/dont-panic-kubernetes-and-docker/)
4. [Container Runtimes - Kubernetes](https://kubernetes.io/docs/setup/production-environment/container-runtimes/)
5. [containerd](https://containerd.io/)
6. [Podman Documentation](https://docs.podman.io/)
7. [Podman Desktop](https://podman-desktop.io/)
8. [rkt - GitHub (archived)](https://github.com/rkt/rkt)
9. [OverlayFS - The Linux Kernel documentation](https://docs.kernel.org/filesystems/overlayfs.html)
10. [lazydocker](https://github.com/jesseduffield/lazydocker)
