Docker Complete Guide
Docker packages an application together with everything it needs to run โ code, runtime, system libraries, configuration โ into a single portable image, so it behaves identically on a laptop, a CI runner, or a production server. A container is what you get when that image actually runs: an isolated process with its own filesystem and network, built on Linux kernel features rather than a full virtual machine, which is why it starts in milliseconds instead of minutes. This doc walks through the 10 concepts that make up everyday Docker usage, each with a diagram, a "where & when to use it" guide, and concrete implementation steps.
Use the sidebar to jump straight to any topic โ each one opens its own page with a full explanation, a diagram of exactly how it fits into the container lifecycle, and the concrete steps to use it for real. If you're starting from zero, work through Introduction & Installation and Images vs Containers first: everything else on this page assumes Docker is already running and that distinction already makes sense.
A Dockerfile builds into an image once; that same image can be run as a container anywhere Docker is installed, with identical behavior every time. Everything below the line is a concept that shapes how that pipeline actually behaves in practice โ each one is its own topic in this guide.
All 10 topics in this guide
Summary & Patterns
Once the individual topics make sense on their own, these references tie them together: the order to learn them in, and the single habit โ layer ordering โ that separates a Dockerfile that rebuilds in two seconds from one that rebuilds from scratch every time.
Recommended Learning Order
Key Concept โ Why Layer Order Controls Rebuild Speed
The single biggest lever over how fast docker build feels day to day: whether dependencies are installed before or after your source code is copied in.
Docker caches each layer and only re-runs an instruction โ and everything after it โ when that instruction's own inputs change. Copy source code before installing dependencies (left) and a one-line code edit invalidates the install step too, every time. Copy just package.json first and install before the rest of the source (right), and the same edit only invalidates the final COPY โ npm install stays cached until package.json itself actually changes.
Official Documentation Reference URLs
Every topic covered in this guide, with a direct link to its official Docker docs.