| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
DockerClientConfig
|
Looking at the changes, it should be fine. Shouldn't the interface DockerCmdExecFactory contain the methods that were added, meaning: public DockerCmdExecFactory withReadTimeout(Integer readTimeout); I used to create my DockerClient object this way: DockerClient client = DockerClientBuilder.getInstance(config).build(); As of now, I don't really see a clean way to add those parameters. What would be perfect is something like this: DockerClientConfig config = DockerClientConfig.createDefaultConfigBuilder() DockerClientBuilder builder = DockerClientBuilder.getInstance(config); My apologies if I just don't see it like I should, but many thanks for moving forward with this as a pull request. Best regards, Eric |
Sorry, something went wrong.
|
Thanks for your feedback. As all these settings are highly implementation dependent the only way to configure is to do it manually like this: DockerClientConfig config = DockerClientConfig.createDefaultConfigBuilder() .withUri(dockerRemoteApiUrl) .withUsername(registryUser) .withPassword(registryPass) .withEmail(registryMail) .withServerAddress(registryUrl) .build(); DockerCmdExecFactoryImpl dockerCmdExecFactory = new DockerCmdExecFactoryImpl() .withReadTimeout(1000) .withConnectTimeout(1000); DockerClient dockerClient = DockerClientBuilder.getInstance(config) .withDockerCmdExecFactory(dockerCmdExecFactory) .build(); In know this is a bit cumbersome but the main goal is to free DockerClientConfig from implementation specific details. You can think of DockerClientConfig as an representation of the configuration possibilities of the docker CLI (https://docs.docker.com/reference/commandline/cli/). You can't configure something like a read timeout or request filters there. |
Sorry, something went wrong.
|
Apologies for the delay, but I still have to rework my old code in order to support the new workflow with the callbacks. I haven't had time yet to do so, but I'll let you know ASAP. Thanks for your support! |
Sorry, something went wrong.
|
@ericfjosne So do you think I should merge into master now? |
Sorry, something went wrong.
|
I say we have a winner indeed :) By the way, the callback objects are really sexy compared to what was existing before ! |
Sorry, something went wrong.
Remove JAXRS/ApacheConnector implementation specific properties from DockerClientConfig
|
@ericfjosne Great that it works for you now. FYI: Just released v2.0.0. Thanks for input! |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
... so things like readTimeout, connectTimeout, maxTotalConnections, maxPerRouteConnections are configurable via DockerCmdExecFactoryImpl now.