docker images shows images held locally, with repository, tag, ID, age, and size. In CI it is mostly used in scripts with -q and --format to feed image IDs into other commands or to assert that a build produced the expected tags.
Common flags
-q, --quiet - output only image IDs
-a, --all - include intermediate images
--filter - filter results, e.g. dangling=true or reference='myorg/*'
--format - Go template output, e.g. "{{.Repository}}:{{.Tag}}"
Use --format to assert a build produced expected tags, and -q --filter dangling=true to collect untagged leftover layers for cleanup with docker rmi. Scripting against IDs avoids parsing the human-readable table columns.
Key takeaways
-q emits bare image IDs for piping into rmi or other commands.
--filter dangling=true finds untagged layers to reclaim disk.
--format produces stable, scriptable output instead of the table view.
Frequently asked questions
docker images Command Reference?
docker images shows images held locally, with repository, tag, ID, age, and size. In CI it is mostly used in scripts with -q and --format to feed image IDs into other commands or to assert that a build produced the expected tags.
In CI?
Use --format to assert a build produced expected tags, and -q --filter dangling=true to collect untagged leftover layers for cleanup with docker rmi. Scripting against IDs avoids parsing the human-readable table columns.