Docker is a platform for developing, shipping, and running applications in containers. Containers package an application with all its dependencies, ensuring it runs consistently across different environments.

Key Concepts

  • Images — Read-only templates used to create containers
  • Containers — Running instances of images
  • Dockerfile — Script that defines how to build an image
  • Docker Compose — Tool for defining multi-container applications

Why Docker?

  1. Consistency — “Works on my machine” becomes “works everywhere”
  2. Isolation — Applications run in isolated environments
  3. Portability — Move containers between development, staging, and production
  4. Efficiency — Containers share the host OS kernel, using fewer resources than VMs