Docker and Docker Swarm command guide

106 searchable commands, flags and gotchas — with real examples.

106 entries · arrow keys to move, Enter to open

Images
Containers
Dockerfile
Volumes & storage
Networking
Compose
Swarm cluster
Swarm services
Swarm stacks
Secrets & configs
Registry
Ops & debugging
Pitfalls

About the Docker and Swarm guide

How it works in 4 steps · 4 common use cases · 4 questions answered

How it works

  1. 1.Type what you are trying to do — drain, rolling update, secret, overlay, prune — or browse a category.
  2. 2.Search covers titles, summaries, tags, examples and notes, so a flag you half-remember finds the entry.
  3. 3.Open an entry for the command, a runnable example, what it does, the traps, and the related commands.
  4. 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.