With Docker 20.10.0 listImages filter no longer works
See original GitHub issueWith 20.10.0 docker removed the filter parameter when listing images.
https://docs.docker.com/engine/deprecated/#filter-param-for-imagesjson-endpoint
This causes
return dockerClient.listImagesCmd()
.withImageNameFilter("mongo:4.2")
.exec()
.stream()
.findFirst()
.map(Image::getId);
to return the ID of the first image out of ALL images.
My current workaround for this is
try{
return Optional.ofNullable(dockerClient.inspectImageCmd("mongo:4.2").exec().getId());
} catch (final NotFoundException e) {
return Optional.empty();
}
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Docker Engine release notes - Docker Documentation
Docker Engine release notes. This document describes the latest changes, additions, known issues, and fixes for Docker Engine.
Read more >docker images - Docker Documentation
If you specify REPOSITORY but no TAG , the docker images command lists all images in ... If there is more than one...
Read more >Docker Engine API v1.41 Reference
Filters to process on the container list, encoded as JSON (a map[string][]string ). For example, {"status": ["paused"]} will only return paused containers.
Read more >Filtering images works but not when using docker image prune
docker image ls --filter "label=testuseradd" REPOSITORY TAG IMAGE ID CREATED SIZE testuseradd/simple example 74707eaff6fd 8 minutes ago ...
Read more >docker image prune - Docker Documentation
If `-a` is specified, will also remove all images not referenced by any ... that a label does not have a specific value),...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yes, that’s correct (they removed the deprecated param)
There are several options: