Docker
A platform for developing, shipping, and running applications in lightweight, isolated containers that package code with all dependencies.
Also known as: Docker Container, Docker Engine
Category: Software Development
Tags: software-engineering, devops, tools, infrastructure
Explanation
Docker is a containerization platform that revolutionized software deployment by making containers accessible to developers. Created by Solomon Hykes at dotCloud (later Docker, Inc.) and released as open source in 2013, Docker became the de facto standard for containerization.
Unlike virtual machines that include full operating systems, Docker containers share the host kernel while maintaining isolation through Linux namespaces and cgroups. This architecture makes containers extremely fast to start (milliseconds versus minutes for VMs), efficient in resource usage, and consistent across environments, effectively solving the infamous 'works on my machine' problem.
Core Concepts:
- Images: Read-only templates containing the application and all its dependencies
- Containers: Running instances of images that can be started, stopped, and deleted
- Dockerfiles: Scripts that define how to build an image layer by layer
- Registries: Storage and distribution systems for images (Docker Hub, AWS ECR, Google GCR)
- Volumes: Persistent storage mechanisms that survive container restarts
- Networks: Virtual networks that enable communication between containers
- Compose: A tool for defining and running multi-container applications
Docker Architecture:
Docker uses a client-server architecture. The Docker client (CLI) communicates with the Docker daemon (dockerd) via a REST API. The daemon manages images, containers, networks, and volumes. Under the hood, the daemon uses containerd as the container runtime, which interfaces with the Linux kernel's isolation features.
Key Benefits:
- Portability: Containers run identically across development, testing, and production environments
- Efficiency: Containers share the OS kernel, enabling high density (hundreds per host vs. tens for VMs)
- Speed: Near-instant startup times compared to minutes for virtual machines
- Isolation: Applications run in isolated environments with their own filesystem, network, and process space
- Scalability: Easy to replicate containers for horizontal scaling
The Docker ecosystem includes Docker Hub (the largest public image registry), Docker Desktop (GUI for Mac and Windows), Docker Compose (multi-container orchestration), and integration with orchestration platforms like Kubernetes for large-scale deployments.
Related Concepts
← Back to all concepts