Filters
How to search
  • Plain words find names, texts and examples.
  • "two words" finds the exact phrase.
  • --name or -x finds an option.
  • #word looks only inside commands.
  • @grep finds lessons and labs that use grep.
  • Filters: cat:network · in:labs · in:notes · level:rhcsa · ch:8 · root:yes. Put ! before a word to leave it out. OR between words means one of them.
  • ↑ ↓ to move · Enter to open · Esc to close · / to search

Chapter 1Name in the course: What is a container?

Understand containers, images and registries

A container is a normal Linux process with its own view of the system: its own files, network, process list and limits. An image is the read-only template it starts from. A registry stores and shares images. Docker made containers popular; Podman (the RHEL tool) runs the same images with the same commands.

  • 5 Lessons
  • 4 Commands

$ run as a normal user# run as root (or with sudo)

1.1

Compare containers and VMs

A VM has its own kernel and a full OS. A container shares the host's kernel and only carries the app and its libraries.

Virtual machineContainer
Starts inMinutesSeconds or less
SizeGBsMBs
KernelOwnShared with the host
IsolationStrong (hypervisor)Kernel features (namespaces, cgroups, SELinux)
Good forDifferent OSes, strong separationMany small services, CI, fast deploys

1.2

Know the Linux features behind it

Containers are built from kernel features, not magic.

FeatureGives the container
NamespacesOwn PIDs, network, mounts, host name, users
cgroupsLimits for CPU, memory, I/O, number of processes
CapabilitiesOnly some root powers, not all
seccompA filter on system calls
SELinux / AppArmorLabels that stop escapes to host files
Overlay file systemImage layers + one writable layer

1.3

Understand images and layers

An image is a stack of read-only layers (one per build step) plus metadata (start command, ports, user). A container adds one thin writable layer on top.

docker pull nginx:1.27
docker image history nginx:1.27
docker image inspect nginx:1.27 --format '{{.Config.ExposedPorts}} {{.Config.User}}'
podman pull registry.access.redhat.com/ubi10/ubi

Remember

Delete a container and its writable layer is gone. Data that must stay goes into a volume: Keep data with volumes.

1.4

Know registries and names

A full image name is REGISTRY/NAMESPACE/NAME:TAG (or @sha256:DIGEST).

RegistryExample
Docker Hubdocker.io/library/nginx:1.27
GitHub Container Registryghcr.io/s0sta/shop:1.0
Red Hatregistry.access.redhat.com/ubi10/ubi
Azure Container Registryacrshop2026.azurecr.io/shop:1.0
Quayquay.io/s0sta/web-bootc:1.0

Watch out

latest is just a tag name, not "the newest". It can change any time. Use fixed tags or digests in production.

1.5

Know the standards and tools

The OCI (Open Container Initiative) standards make images and runtimes work across tools.

ToolRole
Docker Engine (docker)Daemon + CLI, the most known tool
Podman (podman)Daemonless, rootless, RHEL default (command page)
BuildahBuild images without a daemon
SkopeoInspect and copy images in registries (command page)
containerd / CRI-ORuntimes used by Kubernetes
runc / crunThe low-level runtime that starts the process
docker version
podman info --format '{{.Host.OCIRuntime.Name}}'

At work

On RHEL, dnf install podman-docker gives a docker command that runs Podman — most scripts work unchanged.

All commands in this chapter