Tech Terms Explained Open in the app →

Container

DevOps · Beginner · 4 min read

What is it?

A container packages an application together with everything it needs to run, so it behaves the same on any machine.

Explain like I'm 5

A container is like a lunchbox that holds a meal and all its utensils: wherever you take it, you have exactly what you need to eat, no kitchen required.

Why was it created?

Apps often broke moving between machines because environments differed. Containers were created to bundle the app and its dependencies so it runs identically everywhere.

Where is it used?

  • Packaging and shipping apps
  • Local development environments
  • Cloud and Kubernetes deployments
  • Consistent testing pipelines

Why should developers care?

Containers are the standard unit for shipping software today, so nearly every backend and DevOps role uses them.

How does it work?

A container runs as an isolated process on a shared operating system kernel, with its own filesystem and dependencies bundled in an image. Because it shares the kernel, it's lightweight and starts fast.

Real-world example

A team packages their app into a container image; it runs the same on a developer's laptop, in CI, and in production.

Common use cases

  • Consistent environments
  • Fast, repeatable deployments
  • Isolating apps on one host
  • Building blocks for orchestration

Advantages

  • Runs the same everywhere
  • Lightweight and fast to start
  • Isolates dependencies
  • Easy to scale and replace

Disadvantages

  • Less isolation than full VMs
  • Stateful data needs external storage
  • Image and registry management overhead

When should you use it?

When you want consistent, portable, easily-scaled application packaging.

When should you avoid it?

When strong OS-level isolation is required (a VM may fit better) or for trivial single-machine scripts.

Alternatives

Virtual machinesRunning directly on the hostServerless functions

Related terms

DockerKubernetesPodAmazon ECR

Interview questions

Beginner

  • What is a container?
  • What problem do containers solve?

Intermediate

  • How does a container differ from a virtual machine?
  • What is a container image?

Senior

  • What are the isolation trade-offs of containers vs VMs?
  • How do you handle persistent data in containers?

Common misconceptions

  • "A container is a lightweight virtual machine" — it shares the host kernel rather than running a full guest OS.
  • "Containers are fully isolated like VMs" — they share the kernel, so isolation is weaker.

Fun facts

  • Containers share the host OS kernel, which is why they start in milliseconds.
  • A container is a running instance of a packaged image.

Timeline

  • 2013 — Docker popularizes containers for developers

Learning resources

Quick summary

A container bundles an app with its dependencies so it runs identically anywhere, sharing the host kernel for lightweight speed.

Cheat sheet

  • Packages app + dependencies
  • Runs the same everywhere
  • Shares host kernel (lightweight)
  • Built from images

If you remember only one thing

A container bundles an app with everything it needs so it runs the same on any machine.