Remove JAXRS/ApacheConnector implementation specific properties from DockerClientConfig by marcuslinke · Pull Request #282 · docker-java/docker-java
Looking at the changes, it should be fine.
However, I'm questioning what is now the best way to actually create a DockerClient?
Shouldn't the interface DockerCmdExecFactory contain the methods that were added, meaning:
public DockerCmdExecFactory withReadTimeout(Integer readTimeout);
public DockerCmdExecFactory withConnectTimeout(Integer connectTimeout);
public DockerCmdExecFactory withMaxTotalConnections(Integer maxTotalConnections);
public DockerCmdExecFactory withMaxPerRouteConnections(Integer maxPerRouteConnections);
public DockerCmdExecFactory withClientResponseFilters(ClientResponseFilter... clientResponseFilter);
public DockerCmdExecFactory withClientRequestFilters(ClientRequestFilter... clientRequestFilters);
I used to create my DockerClient object this way:
DockerClientConfig config = DockerClientConfig.createDefaultConfigBuilder()
.withUri(dockerRemoteApiUrl)
.withUsername(registryUser)
.withPassword(registryPass)
.withEmail(registryMail)
.withServerAddress(registryUrl)
.build();
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()
.withUri(dockerRemoteApiUrl)
.withUsername(registryUser)
.withPassword(registryPass)
.withEmail(registryMail)
.withServerAddress(registryUrl)
.build();
DockerClientBuilder builder = DockerClientBuilder.getInstance(config);
DockerCmdExecFactory dExecFactory = DockerClientBuilder.getDefaultDockerCmdExecFactory();
dExecFactory.setReadTimeout(...);
dExecFactory.setConnectTimeout(...);
DockerClient client = builder.withDockerCmdExecFactory(dExectFactory).build();
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