1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-23 22:42:08 +02:00
tldr/pages/common/docker-images.md
Gonzalo Matheu 232ac605e9
docker-images: Adding command to sort images by size (#10231)
* docker-images: Adding command to sort images by size

From: https://stackoverflow.com/a/61091528/520275

* docker-images: Adding colon to git images sort command
2023-07-16 14:07:12 +08:00

28 lines
611 B
Markdown

# docker images
> Manage Docker images.
> More information: <https://docs.docker.com/engine/reference/commandline/images/>.
- List all Docker images:
`docker images`
- List all Docker images including intermediates:
`docker images --all`
- List the output in quiet mode (only numeric IDs):
`docker images --quiet`
- List all Docker images not used by any container:
`docker images --filter dangling=true`
- List images that contain a substring in their name:
`docker images "{{*name*}}"`
- Sort images by size:
`docker images --format "{{.ID}}\t{{.Size}}\t{{.Repository}}:{{.Tag}}" | sort -k 2 -h`