Docker CLI
The commands you actually type every day. Following the official Docker CLI reference (as of 2026-06). For the concept basics, see Core concepts.
Container lifecycle
Key docker run flags
Flags decide how a container runs; these are the most used:
The four
--restart policies:
Inspect and debug
Image commands
docker build usage is in Building a Dockerfile from scratch.
Cleanup commands
Images, containers, and volumes pile up. These are destructive, so be clear what each removes:Multiple daemons and diagnostics
Deprecated items (as of 2026-06)
Next
- Docker Hub: where pulled / pushed images come from.
- Performance settings: WSL 2 backend resources and daemon.json.
- Where data lives:
-vvs--mountand the traps. - Docker Compose: bring up many containers at once.