docker:tldr:82b06
The command docker images
retrieves a list of all the available Docker images on a system. The option --filter
is used to apply filters to the images list.
In this particular command, --filter dangling=true
is used to filter the images list and only show the dangling (or unused) images.
Dangling images are those that are not associated with any containers or tags. They are typically created when a new image is built, an image is pulled from a registry, or when an image is deleted without removing its associated containers. These dangling images consume disk space and are not actively used, so it's a good practice to periodically remove them to free up disk space.
By running docker images --filter dangling=true
, you can get a list of only the dangling images that need to be removed from your system.