Docker
DOK-er
The most widely used platform for building, running, and sharing containerized applications.
Docker is the tool that popularized containers. It provides a simple way to package an application and its dependencies into a portable container image, distribute that image via registries, and run it on any machine with Docker installed.
A Dockerfile is a recipe for building a container image. It specifies the base image (like node:20-alpine), copies your code, installs dependencies, and defines the startup command. The result is an image that runs identically on any Docker host.
Docker Compose extends this to multi-container applications. A docker-compose.yml file defines a web server, a database, and a cache as separate containers that start together with one command. This is the standard way to set up local development environments for applications with multiple services.
Examples
A developer sets up a local development environment.
The developer runs docker compose up and gets a running instance of the application, a PostgreSQL database, and a Redis cache, all configured and connected. New team members go from zero to running application in 5 minutes instead of a day of manual setup.
A company pushes images to a registry.
The CI pipeline builds a Docker image on every merge to main, tags it with the git commit hash, and pushes it to Amazon ECR (a container registry). The deployment pipeline pulls that exact image and runs it in production. The image is identical in CI, staging, and production.
A Docker image is too large.
The initial Docker image is 1.2GB because it includes build tools, test dependencies, and source code. The developer implements a multi-stage build: one stage compiles the application, a second stage copies only the compiled output into a minimal base image. Image size drops to 80MB.
In practice
Read more on the blog
Frequently asked questions
Is Docker the same as containers?
No. Docker is a specific tool for creating and running containers. Containers are the concept. Other container runtimes exist (containerd, Podman), but Docker is the most widely used and the name has become nearly synonymous with containers.
Do I need Docker for local development?
Not always, but it helps. Docker Compose can set up databases, caches, and other services without installing them natively. For the application itself, many developers run code directly on their machine and only use Docker for supporting services.
Related terms
Lightweight, portable packages that bundle application code with all its dependencies.
An open-source system for automating the deployment, scaling, and management of containerized applications.
Continuous integration and continuous deployment: automating code testing and delivery to production.
An architecture where an application is built as a collection of small, independent services.

Want the complete playbook?
Picks and Shovels is the definitive guide to developer marketing. Amazon #1 bestseller with practical strategies from 30 years of marketing to developers.