What are Containers?

A container packages an application with its dependencies and runs as an isolated process on a shared OS kernel.

Beginner 5 min DevOps
DevOps · containers
  • Image lifecycle
  • Runtime
  • Orchestration
App + dependenciesDockerfile · declared onceBuilddocker build .Container imageImmutable layers · sha256Registrypush / pull · versioned tagspull imageOrchestratorSchedules replicas, restarts failures, scales up and downdesired: 3 / running: 3Container 1PID 1 · apiSame image · isolated namespaceContainer 2PID 1 · apiSame image · isolated namespaceContainer 3PID 1 · workerSame image · isolated namespaceContainer runtimepulls the image · starts processesShared OS kernelOne kernel serves every container — no guest OS per container× 1 FOR ALLHost machine — physical or virtual serverCONTRAST — VIRTUAL MACHINESA full OS per VM.Containers share one kernel instead.
One image is built once and promoted through a registry; on the host it runs as several isolated processes above a single shared OS kernel — not as small virtual machines.

Hover a component to isolate its relationships; click any layer for a short explanation.

Common misconception

“"A container is a small virtual machine."”

Containers share the host's kernel and isolate processes; VMs virtualise hardware and run a full guest operating system. That is why containers start in milliseconds.

Next conceptInfrastructure as CodeInfrastructure as code describes environments in version-controlled files instead of manual console clicks.