Docker Engine 29 reference · Images
docker image ls Command (Docker CLI)
List local images with repository, tag, ID and size; filter dangling images and format the output.
Docker Engine 29
Syntax
docker image ls [OPTIONS] [REPOSITORY[:TAG]]
Parameters
| Parameter | Description |
|---|---|
--filter dangling=true |
Only untagged images. |
--format TEMPLATE |
e.g. '{{.Repository}}:{{.Tag}} {{.Size}}'. |
-q |
Only image IDs. |
Examples
docker image ls alpine --format '{{.Repository}}:{{.Tag}}' | grep -x 'alpine:3.24'
Output
alpine:3.24
Run this on your computer — see “Get Started” for setup.
docker image ls --format '{{.Repository}}:{{.Tag}} {{.Size}}' | grep -E '^(alpine:3.24|nginx:1.29-alpine) '
Output
alpine:3.24 13MB nginx:1.29-alpine 93.5MB
Run this on your computer — see “Get Started” for setup.
Related
docker build· Build an image from a Dockerfile and a build context, with tags, build arguments, secrets, targets and platforms.docker image rm· Remove local images or tags; an image used by a container must be forced, and shared layers stay until unused.- Images and Layers · tutorial