How it works
A Dockerfile lists the steps to build an image: start from a base such as node or python, copy the code in, install dependencies and name the command to run. The image is a sealed, layered bundle, and a container is a running copy of it. Containers share the host's operating system kernel, so they start in seconds and use far less memory than full virtual machines.
Images are pushed to a registry such as Docker Hub or GitHub's container registry, then pulled by servers, CI runners and cloud platforms (Cloud Run, Fly.io, AWS ECS, Kubernetes). Docker Compose starts several containers together from one file, which is the usual way to run an app and its database locally. Images follow the open OCI standard, so other tools such as Podman run them too.
Docker pros and cons
Pros
- Ends 'works on my machine': the same image runs everywhere
- Starts a database or any other service locally in one command
- Supported by nearly every host, cloud and CI service
- Lighter and quicker to start than virtual machines
Cons
- Another layer to learn: images, volumes, networks and ports
- On Mac and Windows it runs inside a hidden Linux VM that costs memory
- Docker Desktop needs a paid plan at larger companies
When to use Docker
Pick it when
- Running an app with its database and services locally
- Deploying to a VPS, Cloud Run, Fly.io or Kubernetes
- Builds that must be reproducible across machines and CI
Skip it when
- Static sites and serverless apps, where the host builds and runs the code for you
Docker pricing
Free tier
Docker Engine is open source. Docker Desktop is free for individuals and companies under 250 staff and $10 million revenue; otherwise Pro about $9, Team $15 or Business $24 per user a month, billed yearly.
Docker pricing page (opens in a new tab)Approximate, checked September 2026.What the other tools cost
Docker vs the alternatives
Related terms
More in Dev workflow and DevOps
Shipping