Tech Terms Explained Open in the app →

Docker

DevOps · Beginner · 5 min read

What is it?

Docker is a tool that packages an application and everything it needs to run into a single portable unit called a container.

Explain like I'm 5

Docker is like a lunchbox that holds your sandwich, drink, and napkin together so you can eat the same lunch anywhere — at school, at the park, or at home.

Why was it created?

Apps that work on one developer's machine often broke on another's because of different software versions and settings. Docker solves this by bundling the app with its environment so it behaves the same everywhere.

Where is it used?

  • Running microservices in production
  • Isolating development environments
  • Building CI/CD pipelines
  • Packaging apps for cloud platforms

Why should developers care?

Containers are the standard way modern software is shipped and deployed. Understanding Docker is essential for most backend and DevOps roles.

How does it work?

Docker builds a read-only image from a Dockerfile — a recipe that lists the base OS, dependencies, and startup command. When you run an image Docker creates a lightweight, isolated container process that shares the host OS kernel but has its own filesystem and network.

Real-world example

A web team packages their Node.js API as a Docker image. Every developer pulls the same image and runs it locally, eliminating the classic 'it works on my machine' problem.

Common use cases

  • Local development environments
  • Microservice deployments
  • Automated testing in CI
  • Shipping reproducible builds

Advantages

  • Consistent environments across machines
  • Lightweight compared to full virtual machines
  • Fast startup times
  • Large ecosystem of public images

Disadvantages

  • Adds complexity for simple applications
  • Containers share the host kernel, so isolation is weaker than a full VM
  • Persistent storage and networking require extra configuration

When should you use it?

When you need consistent, reproducible environments or are deploying services to a container orchestration platform.

When should you avoid it?

For simple scripts or desktop apps where the overhead of containerization outweighs the benefits.

Alternatives

PodmancontainerdLXC

Related terms

KubernetesCI/CDMicroservices

Interview questions

Beginner

  • What is the difference between a Docker image and a container?

Intermediate

  • How would you reduce the size of a Docker image?

Senior

  • How do you manage secrets securely in a containerized application?

Common misconceptions

  • "Docker containers are virtual machines" — containers share the host OS kernel and are much lighter than VMs.

Fun facts

  • The Docker logo whale is named Moby Dock.

Timeline

  • 2013 — Docker released as open source by Solomon Hykes at PyCon

Learning resources

Quick summary

Docker packages apps and their dependencies into portable containers so they run the same way everywhere.

Cheat sheet

  • Container = running image
  • Image built from a Dockerfile
  • docker run, docker build, docker pull are core commands

If you remember only one thing

Docker eliminates environment differences by shipping your app bundled with everything it needs to run.