File tree Expand file tree Collapse file tree
JShellAPI/src/main/java/org/togetherjava/jshellapi/service Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1717import java .io .*;
1818import java .nio .charset .StandardCharsets ;
1919import java .time .Duration ;
20- import java .util .Arrays ;
21- import java .util .Map ;
22- import java .util .Set ;
23- import java .util .UUID ;
20+ import java .util .*;
2421import java .util .concurrent .TimeUnit ;
2522
2623@ Service
@@ -60,10 +57,11 @@ public String spawnContainer(
6057 ) throws InterruptedException {
6158 String imageName = "togetherjava.org:5001/togetherjava/jshellwrapper" ;
6259 boolean presentLocally = client .listImagesCmd ()
63- .withImageNameFilter ( imageName )
60+ .withFilter ( "reference" , List . of ( imageName ) )
6461 .exec ()
6562 .stream ()
66- .anyMatch (it -> Arrays .asList (it .getRepoTags ()).contains ("master" ));
63+ .flatMap (it -> Arrays .stream (it .getRepoTags ()))
64+ .anyMatch (it -> it .endsWith (":master" ));
6765
6866 if (!presentLocally ) {
6967 client .pullImageCmd (imageName )
You can’t perform that action at this time.
0 commit comments