I can write
docker images --filter "dangling=true"
What other filters can I use?
I can use something like this?
docker images --filter "running=false"
I can write
docker images --filter "dangling=true"
What other filters can I use?
I can use something like this?
docker images --filter "running=false"
Docker v1.13.0 supports the following conditions:
Or use
grep
to filter images by some value:References
You can also use the
REPOSITORY
argument todocker images
to filter the images.For example, suppose we have the images:
We can explicitly filter for all images with a given name:
Docker also supports globbing:
Official docs here.
For cleaning up old stopped containers you can use:
docker container prune
To remove untagged images you can use:
docker image prune
In Docker v1.7:
The currently supported filters are:
true
orfalse
)label=<key>
orlabel=<key>=<value>
)For me,
did the trick. The date command is able to produce output in the same format via
which allows me to compare timestamps. I still use the filter for dangling images for convenience, though.