# docker images Command Reference

> Reference for docker images in CI: list local images with --filter, --format, and -q to inspect or script over the image cache in pipelines.

Source: https://latchkey.dev/learn/command-reference/docker-images-command-reference  
Updated: 2026-06-26

List images in the local store.

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}}"
- `--digests` - show image digests

## Example

```shell
docker images --format "{{.Repository}}:{{.Tag}} {{.Size}}"
docker rmi $(docker images -q --filter "dangling=true")
```

## 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.

## FAQ

### 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.

---

Latchkey runs CI/CD that repairs its own failures. Agent entry points: https://latchkey.dev/agent.txt, https://latchkey.dev/openapi.json, https://latchkey.dev/llms.txt
