Skip to content
Getting Digital

Containers

Also: containerization, Docker containers, OCI containers

A container is an application packaged together with the libraries and configuration it needs, run as an isolated process on a host that is already switched on, so the same package behaves the same way on a laptop, in a build pipeline and in production.

Our take. Containerise your development environment first, because the payoff is immediate and nothing is at stake if you get it wrong. In production they start paying once you run more than one service, while Kubernetes only pays once a named person owns it, since an unattended cluster fails in more elaborate ways than the outages it was bought to prevent.

Two halves make a container, and they are worth separating. The packaging half is an image: a stack of read-only filesystem layers, built from a recipe file, holding your code alongside the exact library versions it was tested against. The isolating half comes from the Linux kernel rather than from virtualisation. Namespaces give the process its own view of the filesystem, the process table and the network, while control groups cap how much processor time and memory it may take. Nothing boots. No guest operating system exists inside the package, which is why starting one costs roughly what starting a process costs, whereas a VPS needs the time a computer needs to switch itself on. The price of that speed is a shared kernel, so the partition between two containers is thinner than a hypervisor's and a kernel vulnerability is everyone's problem simultaneously. Docker made the format ordinary, then handed the specifications to the Open Container Initiative, which is why an image built with Docker also runs under Podman, under containerd and on a Kubernetes node without anybody renegotiating a format.

  • The environment stops being a variable. Works on my machine was never a lie about the code; it was a difference in what surrounded the code. Freezing the surroundings into the artefact removes the argument.
  • One build, promoted everywhere. The identical image that passed tests is the image that reaches production, rather than a fresh install performed separately on each server and hoped to match.
  • State needs a decision. A container's own filesystem is disposable, so uploads, databases and anything else that must survive a restart belong in a mounted volume or an external service. Discovering this after a redeploy is a rite of passage nobody enjoys.
  • Images age. A base layer pulled last spring carries last spring's unpatched system libraries, so rebuilding and scanning them is continuous maintenance, not a task anybody finishes.

A single container running on one machine is simply a tidier deployment. Forty containers spread over a dozen machines is a distributed system, and that is where Kubernetes arrives. It schedules workloads onto nodes, restarts whatever dies, rolls new versions out gradually, and rolls them back when the health checks disagree with the optimism of the deploy. It also brings a vocabulary of its own, failure modes of its own, and in practice a person whose working week is partly devoted to it. The useful question for a small team is not whether the thing is good, because it plainly is, but whether the labour it automates is labour anybody is currently performing. A single application behind a load balancer, shipped with Compose or a managed container service from your provider, covers a great deal of territory before a cluster starts earning its keep. The industry consensus that arrived with the technology, that everything must be orchestrated, has quietly softened into something closer to it depends on how many moving parts you have.

In practice

A team writes FROM node:latest at the top of their build recipe. Tests pass on Tuesday. On Thursday the identical recipe produces a different image, because the latest label upstream has moved to a new major release, and a dependency compiled against the previous one now refuses to install. Nothing in the repository changed, which is the tell: the build was never reproducible to begin with. The fix is to say what you mean. Naming node:22-alpine pins a major version, and pinning by digest with the sha256 form nails the exact bytes, so the image that passed tests is provably the image that runs. Those two choices trade against each other, since a pinned digest never picks up a security fix on its own and therefore needs a tool watching for updates on your behalf.

Often confused with

VPS (Virtual Private Server)
A VPS emulates a whole computer and boots a kernel of its own; a container borrows the host's and fences off nothing but the process, which is precisely why one starts in a blink and the other does not.
Serverless Computing
Serverless keeps both the machine and the scaling policy out of sight; containers hand you both, together with the responsibility for deciding how many copies should be running.

Key takeaways

  • →An image freezes code and surroundings into one artefact, which is what makes a build in CI and a run in production the same event twice.
  • →Isolation comes from kernel features rather than emulated hardware: very fast, very small, and one notch less separated than a virtual machine.
  • →Orchestration is where the difficulty relocated, so adopt a cluster when the number of moving parts demands it and not before.

Related concepts

Certifications that test this

Vendor exams whose syllabus covers this concept — facts, cost and a preparation path on each page.

More courses from these shelves

A rotating selection from the course directory, drawn from the subcategories where this concept is taught rather than picked for it. Details, price and the provider link are on the course page.

Build A Photoshop Like App With TKinter and Python GUI Apps

In this course I'll teach you how to make graphical user interfaces for Python using TKinter. You'll be surprised just…

Udemy

Spring Boot 2 Microservice Messaging in RabbitMQ and AWS SQS

Welcome to a solid hands on development course about with Spring Boot Messaging Application Development. In this course…

Udemy

SonarQube in DevOps-Beginner to Advanced Live Projects-3

This course will teach you the keys to Sonar solutions like SonarQube, SonarLint, Sonar cloud and its ecosystem to impr…

Udemy

1Z0-1195-24 Oracle Cloud Infrastructure 2025 Data Certified

The Oracle Cloud Infrastructure Data certification is intended for individuals looking to demonstrate fundamental knowl…

Udemy

DevOps Interview Questions

As a DevOps professional, you may need to undergo an interview process to secure a job. While the exact interview quest…

Udemy

Cloud Computing for CIOs - Basics to Strategy

Looking ahead to migrate your operations from hosted environment to Cloud computing environment. Why should you migrate…

Udemy

FAQ

Container or virtual machine?
A virtual machine emulates hardware and boots an operating system: strong separation, slower starts, a footprint measured in gigabytes. A container fences a process on a shared kernel: near-instant starts, a footprint measured in megabytes, separation that is good but thinner. They combine rather than compete, because production containers almost always run inside virtual machines anyway.
Are they relevant to an ordinary website?
Indirectly, and that is fine. A WordPress site on classic hosting has no reason to adopt them. They begin to matter when environments multiply, when several services have to be kept consistent, or when the platform you already pay for turns out to run them beneath the surface, which most now do.
Is a container secure by default?
It is separated, which is a weaker claim. Running as root inside the image, mounting the host socket into a container, and shipping base layers full of known vulnerabilities are all common and all avoidable. Treat the image as software with a supply chain: pin what it comes from, scan it, rebuild it, and give the process the smallest set of privileges it can work with.

Sources

The primary text this definition rests on. Read it before you trust ours.

Last reviewed 14 September 2026 · Getting Digital