docker · cli · compose · cheatsheet · local

Docker CLI cheatsheet

Searchable reference of 67 Docker CLI and Compose commands. Click any command to copy.

Docker Cheatsheet
67 matches
Visible
67
all
Total
67
commands
Sections
6
groups
Status
ready
local
Search
commands
Images
Containers
Volumes
Networks
Compose
System & maintenance
descriptions
Images
List local images
Download image from registry
docker pull nginx:alpine
Upload image to registry
Build image from Dockerfile
Build without cache
Tag an image with new name
Remove image
Show image layer history
Export image to tarball
Import image from tarball
Remove dangling images
Containers
Create + start container
Run detached
Interactive shell in container
Auto-remove on exit
Map host:container port
Mount current dir into container
Set environment variable
Name the container
List running containers
List all containers (incl. stopped)
Start a stopped container
Gracefully stop container
Restart container
Force-kill container
Remove stopped container
Force-remove running container
Open shell in running container
Tail container logs
Show container details (JSON)
Copy from container to host
Show container processes
Live resource-usage table
Volumes
List volumes
Create named volume
Show volume details
Remove volume
Remove unused volumes
Networks
List networks
Create user-defined network
Show network details
Attach container to network
Detach container from network
Remove network
Remove unused networks
Compose
Start services defined in compose file
Start services detached
Rebuild images before starting
Stop and remove containers + networks
Also remove named volumes
List compose-managed containers
Tail logs from all services
Shell into service
Restart specific service
Build/rebuild services
Pull latest service images
Validate and view merged config
System & maintenance
Display system-wide info
Show client / server versions
Show disk usage
Remove unused data
Aggressive cleanup
Remove stopped containers
Authenticate with a registry
Log out of registry
List Docker contexts
Switch active context
Quick Start

Find any Docker command

Common containers, images, volumes, networks, compose, and system maintenance commands — all searchable.

  1. 01

    Search

    Token, action, or example — all matched.

    Inputs are treated as UTF-8 throughout the pipeline and validated client-side as you type — nothing dispatches until the value is well-formed.

    searchinpututf-8client-sidevalidated
    search · textbuild · set
    docker build
    loaded · parsedclient-side
  2. 02

    Section browse

    Group by container, image, volume, network, compose, system.

    Each toggle re-computes through a memoised hook, so flipping options never resets your input and the UI stays snappy on large inputs.

    scanoptionslivememoisedtoggles
    section · memoisedimage · live
    docker pull
    options set · memoisedlive
  3. 03

    Read description

    Right panel shows what each command does.

    Randomness — where used — comes from crypto.getRandomValues, never Math.random. Heavy work sits in useMemo.

    readcomputeinstantlocaldeterministic
    desc · instantwhat · computed
    build context
    computed · instantinstant
  4. 04

    Copy

    Click any command to copy.

    Copy writes through navigator.clipboard and downloads use a Blob — zero network traffic. Same input plus same options always yield the same bytes.

    copydownloadzero-networkreproducible
    ok · copiedready · copied
    Copied
    shipped · ready to shipsuccess
Pro tips

Pro tips for everyday utilities

Reach for crypto.getRandomValues

Cryptographically random for IDs, tokens, salts. Math.random is for animation and games, not security.

Sort IDs lexicographically

UUID v4 has no time ordering. Use ULID or UUID v7 if you need sorted IDs.

Mock data with seeds

Faker-style libraries can be seeded so tests are reproducible. Embed the seed in the fixture file.

Reference cards beat memory

Cheatsheets for Vim, Git, Docker, Linux signals are faster than man pages when you’re mid-flow.

Browser APIs vary

Touch events, gamepads, and clipboard differ across vendors. Feature-detect before use.

Persist in the right place

localStorage for user preferences, sessionStorage for transient state, IndexedDB for structured data.

Use Cases

When to consult Docker docs

Daily ops, debugging, CI/CD.

Daily ops

Quick container inspect or restart. Random values come from crypto.getRandomValues — cryptographically secure for tokens, salts, and session IDs. Math.random is deterministic enough for animations but predictable enough to be a security bug.

CSPRNG-backed

Debug builds

Find the right flag for build context. Pair with hashids, ULID, or UUID v7 when you need both random and sortable — useful for primary keys, public-facing IDs, and event log ordering without a sequence column.

reproducible

Onboarding

Cheat sheet for new team members. Output is deterministic given the same seed, so fixtures and tests stay reproducible across CI runs and contributor machines. Embed the seed in the fixture file for full replay.

snappy

Compose recipes

Multi-container app commands. Heavy work runs through useMemo so the UI stays snappy on large inputs. Same input + same options yields identical bytes — the kind of stability snapshot tests rely on.

feature-detected

System cleanup

Prune unused images, volumes, networks. Storage tools persist to the right backend: localStorage for user preferences, sessionStorage for transient state, IndexedDB for structured data. Pick the right shelf and quota worries disappear.

deterministic

Registry workflows

Tag, push, pull across registries. Browser feature detection: clipboard, fullscreen, gamepad, and Web Bluetooth APIs gracefully fall back when unavailable. No surprise white screens on Safari or older Firefox.

production-ready
FAQ

Frequently asked questions

Most commands map directly — podman aliases docker for convenience.
This cheatsheet covers the CLI. The Desktop UI exposes most of the same actions.
We list both 'docker-compose' (v1) and 'docker compose' (v2) where syntax differs.
Open a PR — the SECTIONS array lives in this file.
Yes — bundled in JS. Nothing is sent to a server.
Suggest a tool

Something missing?

Tell us what you need. We ship the top requests every two weeks.

Sent straight to the maintainers · no account needed
47 in queue·8 shipped this month
Request queued. Thanks!