我想使用docker java client创建和运行docker。我想要运行这样的东西:
docker logs -f selenium-hub
如何在docker-java客户端上实现此命令?到目前为止,这是我的代码:
result = dockerClient.logContainerCmd(container.getId())
.withStdErr(true)
.withStdOut(true)
.withFollowStream(true)
.withTailAll()
.exec(logContainerResultCallback);
try {
logContainerResultCallback.awaitCompletion();
} catch (InterruptedException e) {
throw new BaseException(e.getMessage());
}catch (Exception e){
throw new BaseException(e.getMessage());
}
break;
为什么它没有显示像docker show? docker show like
"host": null,
"port": 4444,
"prioritizer": null,
"capabilityMatcher": "org.openqa.grid.internal.utils.DefaultCapabilityMatcher"
"throwOnCapabilityNotPresent": true,
"newSessionWaitTimeout": -1,
"jettyMaxThreads": -1,
"nodePolling": 5000,
"cleanUpCycle": 5000,
"timeout": 30000,
"browserTimeout": 0,
"maxSession": 5,
"unregisterIfStillDownAfter": 30000
但它没有在java中显示。
请帮帮我。我是码头工人的新手。我想在java中实现它。非常感谢