EN
Back to the archive

The encyclopedia · Software & IT · Technical decision · 2013–2020

Docker packaged an app with its world so it runs the same everywhere

Docker bundles an app with its dependencies into a container that shares the host kernel, so it runs identically on any machine.

Docker

the move

Software is notorious for working on the engineer's laptop and breaking in production, because the two machines never have the same libraries, runtimes and settings. The traditional fix, a virtual machine, solves that by shipping an entire operating system, but that is big and slow to start.

Docker changed the unit of delivery. An application, its runtime, its libraries and its configuration are baked into a single image, and that image runs in a container. The container shares the host's kernel and uses namespaces and cgroups to isolate the app, so it does not carry a whole operating system.

Because the environment travels with the app, the same image runs the same way in development, testing and production, on whatever host has Docker. A developer can hand a container to a colleague and be confident it works exactly as it did for them.

This made containers lightweight and fast while still keeping apps separated from each other and from the host, which is why they became the standard way to move software between machines.

why it works

  • Bundling dependencies into the image removes the guesswork about what is installed on the host machine.
  • Sharing the host kernel means a container is far smaller and starts faster than a full virtual machine.
  • Namespaces and cgroups give isolation without the overhead of a separate operating system per app.
  • The same image guarantees identical behavior across development, test and production environments.
the payoffShip the environment along with the appclever

what transfers

When environments drift, bundle the environment into the artifact — reproducibility beats promising portability.

what came after

Containers became the default packaging for cloud-native software, and the image-plus-orchestration model grew into the systems that run most of the web. Docker's idea — a self-contained, reproducible artifact — made deployment reliable at scale and is the foundation of modern continuous delivery.

references

spotted an error? The archive wants to know.

same kind of clever