Stack Exchange
docker images select by tag with NOT logic
In my environment, there are:
REPOSITORY                      TAG       IMAGE ID       CREATED      SIZE
xxxxx.azurecr.io/test-api   latest    249d55325q68   2 days ago   103MB
xxxxx.azurecr.io/test-api   v01       249d55325q68   2 days ago   103MB
xxxxx.azurecr.io/test-api   b03       249d55325q68   2 days ago   103MB

I want the result which do not have TAG 'latest'
When I input this:
docker images xxxxx.azurecr.io/test-api:latest
I got:
xxxxx.azurecr.io/test-api   latest    249d55325q68   2 days ago   103MB

What shall I do if I want this result?
xxxxx.azurecr.io/test-api   v01       249d55325q68   2 days ago   103MB
xxxxx.azurecr.io/test-api   b03       249d55325q68   2 days ago   103MB

I tried --filter and but it doesn't work.

I would say the easiest option is to grep the output and invert the match (-v flag):
docker image list|grep -v latest

This will give you the desired output:
REPOSITORY                      TAG       IMAGE ID       CREATED      SIZE
xxxxx.azurecr.io/test-api   v01       249d55325q68   2 days ago   103MB
xxxxx.azurecr.io/test-api   b03       249d55325q68   2 days ago   103MB

This will not work properly if a line in the output contains the word 'latest' in any place other than the tag.
