unkey
  • BlogRead product updates and insights
  • Case studiesPractical results from real deployments
  • ChangelogTrack what shipped, improved, and fixed
  • GlossaryClear definitions for API terms
PricingDocs
Discord
LoginSign Up
  • BlogRead product updates and insights
  • Case studiesPractical results from real deployments
  • ChangelogTrack what shipped, improved, and fixed
  • GlossaryClear definitions for API terms
PricingDocsDiscord
LoginSign Up
  1. Glossary
  2. /Containerization

What Containerization Is

Explore with AI
Open in ChatGPTOpen in ClaudeOpen in Perplexity

TL;DR

Containerization packages an application and its libraries into an image, then runs that image as a container. The container shares the host kernel instead of booting its own operating system.

Image

The files you build and store

Container

A running process from that image

Kernel

The host kernelshared

Containerization packages an application and the libraries it needs into an image, then runs that image as a container. The container is a process on the host kernel. It does not boot its own operating system.

The image is the file you build and store. The container is a running copy of that image. You can start many containers from one image. Deleting a container does not delete the image.

What containerization is

On Linux, a container is an ordinary process with a private view of the system. Namespaces give it its own filesystem tree, process list, and network interfaces. Cgroups limit the CPU and memory it can use. The kernel is the one the host already booted. The namespaces and cgroups manual pages describe those two kernel features.

You build that process from an image. The image stacks a base filesystem, the libraries the application needs, the application itself, and the command that starts the process. A registry stores the image. A host pulls the image and starts a container from it.

FROM node:22-alpine
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci --omit=dev
COPY . .
USER node
CMD ["node", "server.js"]

docker build -t orders-api:1 . writes the image. docker run --rm orders-api:1 starts a container from it. Other tools can build and run the same image. The Open Container Initiative publishes the image spec and the runtime spec. An image that follows the spec is not tied to one vendor's builder.

Anything the process writes in the container's writable layer is gone when the container is deleted, unless you mounted a volume. The image layers stay as they were at build time.

Containers and virtual machines

A virtual machine runs a guest operating system on virtual hardware. A container does not. Startup, density, and the isolation boundary all follow from that.

ContainerVirtual machine
IsolationProcesses on a shared kernelA guest kernel and a full OS
What you copyAn image of the app and its librariesA disk image that includes an OS
What bootsA processA guest operating system
BoundaryThe host kernelA separate kernel

A container is a weaker security boundary than a virtual machine, because a kernel bug is shared by every container on that host. If tenants do not trust each other, put them in separate virtual machines, or run each container inside its own virtual machine. If the services already trust the host, the shared kernel is why one machine can run many of them.

A Linux container needs a Linux kernel. It does not run on a Windows or macOS kernel by itself. Docker Desktop on those systems starts a Linux virtual machine and runs the container inside it. A Windows container needs a Windows kernel in the same way.

Images and containers

The image is the artifact. The container is the process.

  • Building an image does not start the application.
  • Starting a container does not change the image.
  • Two containers from the same image start from the same files. Writes in one container stay in that container.
  • Stopping or deleting the container leaves the image in place, so you can start another copy.
  • Pushing the image to a registry is how another machine gets the same files. The registry can be a public one or a private one. The image format is what the other machine has to understand.

Pin the base image, and rebuild when you want a newer base. A container does not pick up a patched library because someone patched the host. The library is the one in the image.

Put one process in the container. A process that exits on SIGTERM gives the host time to stop it before a replacement starts. Autoscaling adds copies, and a load balancer sends traffic to the ones that are up. A new copy should pass a health check before it receives traffic, and the old copy should finish work it already accepted.

When to use a container

Use a container when the thing you need to reproduce is a process and its libraries.

  • The same image should run in CI and in production.
  • You want more than one copy, and any healthy copy can handle a request. A stateless process fits. Put durable data in a database or another service, not on the container's writable layer.
  • A virtual machine would be a whole operating system for one service, and you do not need a separate kernel.

Use a virtual machine when the workload needs a different kernel than the host, or when the isolation has to survive a bug in the shared kernel.

Containerization is the packaging. It does not choose a machine, store your data, or decide who may call the API. API hosting is where a client can reach the process. Replacing a running copy with a new one from an image, instead of patching the copy, is immutable infrastructure. A scheduler that places copies on machines is a separate job. You can run one container and never set up a cluster.

Docker and the image format

Docker is a tool that builds images and runs containers. Containerization is the practice. Kubernetes schedules containers. It does not define the image format. The Kubernetes container documentation describes a pod as one or more containers that share a network and storage. That scheduling is optional. An application can be containerized and still run as a single container.

A container image is not a virtual machine image. It does not need a guest kernel. Copying a full operating system into the image adds size, and the process still uses the host kernel when it runs. Start from a small base and add the libraries the process imports.

Questions & Answers about Containerization

Containerization packages an application and the libraries it needs into an image, then runs that image as a container. The container is a process that uses the host kernel. It does not boot its own operating system. The image is what you build and store. The container is the running process.

On this page

  1. What containerization is
  2. Containers and virtual machines
  3. Images and containers
  4. When to use a container
  5. Docker and the image format

Turn your API stack into one workflow. Start for free, integrate in minutes, and scale when you need to.

Start for free
unkey

Build better APIs faster

© 2026 Unkey Inc. All rights reserved.

SOC 2 Type II Certified

Company

  • About
  • Careers
  • Status Page
  • Roadmap

Resources

  • Blog
  • Case Studies
  • Changelog
  • Docs
  • Glossary
  • Feature Request
  • Archive

Connect

  • X (Twitter)
  • Discord
  • Book a Call

Legal

  • Terms of Service
  • Privacy Policy
  • Trust Center