Skip to content

Commit a3090ab

Browse files
committed
workaround removed filter operation with newer docker versions
1 parent 5ab3dc2 commit a3090ab

File tree

1 file changed

+7
-1
lines changed
  • eclipse-extensions/org.springframework.ide.eclipse.boot.dash.docker/src/org/springframework/ide/eclipse/boot/dash/docker/runtarget

1 file changed

+7
-1
lines changed

eclipse-extensions/org.springframework.ide.eclipse.boot.dash.docker/src/org/springframework/ide/eclipse/boot/dash/docker/runtarget/DockerApp.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@
7373
import com.github.dockerjava.api.command.CreateContainerCmd;
7474
import com.github.dockerjava.api.command.CreateContainerResponse;
7575
import com.github.dockerjava.api.command.InspectImageResponse;
76+
import com.github.dockerjava.api.command.ListImagesCmd;
7677
import com.github.dockerjava.api.exception.NotModifiedException;
7778
import com.github.dockerjava.api.model.Container;
7879
import com.github.dockerjava.api.model.ExposedPort;
@@ -437,7 +438,12 @@ private String build(AppConsole console) throws Exception {
437438
if (imageTag.startsWith(DOCKER_IO_LIBRARY)) {
438439
imageTag = imageTag.substring(DOCKER_IO_LIBRARY.length());
439440
}
440-
List<Image> images = client.listImagesCmd().withImageNameFilter(imageTag).exec();
441+
442+
// List<Image> images = client.listImagesCmd().withImageNameFilter(imageTag).exec();
443+
ListImagesCmd listImagesCmd = client.listImagesCmd();
444+
listImagesCmd.getFilters().put("reference", Arrays.asList(imageTag));
445+
List<Image> images = listImagesCmd.exec();
446+
441447
if (images.isEmpty()) {
442448
// maybe the 'imageTag' is not actually a tag but an id/hash.
443449
InspectImageResponse inspect = client.inspectImageCmd(imageTag).exec();

0 commit comments

Comments
 (0)