2019-06-07 12:14:58 +02:00
|
|
|
# docker images
|
|
|
|
|
|
|
|
> Manage Docker images.
|
2024-09-23 22:25:20 -07:00
|
|
|
> More information: <https://docs.docker.com/reference/cli/docker/image/ls/>.
|
2019-06-07 12:14:58 +02:00
|
|
|
|
|
|
|
- List all Docker images:
|
|
|
|
|
|
|
|
`docker images`
|
|
|
|
|
|
|
|
- List all Docker images including intermediates:
|
|
|
|
|
2025-03-17 12:09:59 +02:00
|
|
|
`docker images {{[-a|--all]}}`
|
2019-06-07 12:14:58 +02:00
|
|
|
|
|
|
|
- List the output in quiet mode (only numeric IDs):
|
|
|
|
|
2025-03-17 12:09:59 +02:00
|
|
|
`docker images {{[-q|--quiet]}}`
|
2019-06-07 12:14:58 +02:00
|
|
|
|
|
|
|
- List all Docker images not used by any container:
|
|
|
|
|
2025-03-17 12:09:59 +02:00
|
|
|
`docker images {{[-f|--filter]}} dangling=true`
|
2020-10-28 21:42:48 +03:30
|
|
|
|
|
|
|
- List images that contain a substring in their name:
|
|
|
|
|
|
|
|
`docker images "{{*name*}}"`
|
2023-07-16 03:07:12 -03:00
|
|
|
|
|
|
|
- Sort images by size:
|
|
|
|
|
2024-10-24 15:22:35 +02:00
|
|
|
`docker images --format "\{\{.ID\}\}\t\{\{.Size\}\}\t\{\{.Repository\}\}:\{\{.Tag\}\}" | sort -k 2 -h`
|