Docker and Docker Swarm command guide
A searchable catalogue of the Docker you actually type: building and shipping images, running and debugging containers, the Dockerfile instructions and what each one costs, volumes and networks, Compose, and the Swarm half — services, rolling updates, stacks, secrets, placement and the errors that come with them. Every entry carries the command, an example against one small sample system, what it does, the gotchas, and the related commands worth knowing next.
About docker and docker swarm command guide
How it works
- 1. Type what you are trying to do — drain, rolling update, secret, overlay, prune — or browse a category.
- 2. Search covers titles, summaries, tags, examples and notes, so a flag you half-remember finds the entry.
- 3. Open an entry for the command, a runnable example, what it does, the traps, and the related commands.
- 4. Copy the example with one click, or copy the link — every entry is its own URL you can paste into a runbook.
Common use cases
- • Remembering the exact flags for a rolling update or a placement constraint
- • Working out why a Swarm service sits at 0/3 and will not converge
- • Getting a private image to pull on every node instead of just the manager
- • Checking what stack deploy ignores from a compose file before a deploy
FAQ
Does it cover Docker Swarm as well as plain Docker?
Yes — about half the entries are Swarm: cluster setup and quorum, services, scaling, rolling updates and rollbacks, stacks, secrets and configs, placement, and the diagnostics for tasks that will not start.
Are the examples safe to paste?
They target one small sample system (an app image, a database, a five-node swarm) shown on the page. Read them before running — several entries deliberately show destructive commands, like prune and stack rm, with what they take with them.
Is this Compose v1 or v2?
v2: the commands are written as docker compose, not docker-compose. Where Compose and stack deploy differ, the entry says which keys each one ignores.
Why does it not cover Kubernetes?
Because Swarm is what this guide is about. The two solve similar problems with different vocabulary, and mixing them in one reference helps nobody.