com.github.dockerjava.jaxrs.JerseyDockerCmdExecFactory Java Examples
The following examples show how to use
com.github.dockerjava.jaxrs.JerseyDockerCmdExecFactory.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: DockerClientFactory.java From ethsigner with Apache License 2.0 | 5 votes |
private DockerClient createDockerClient(final DefaultDockerClientConfig config) { final DockerCmdExecFactory dockerCmdExecFactory = new JerseyDockerCmdExecFactory() .withMaxTotalConnections(100) .withMaxPerRouteConnections(10) .withReadTimeout(7500) .withConnectTimeout(7500); return DockerClientBuilder.getInstance(config) .withDockerCmdExecFactory(dockerCmdExecFactory) .build(); }
Example #2
Source File: ITTestBase.java From hudi with Apache License 2.0 | 5 votes |
@BeforeEach public void init() { String dockerHost = (OVERRIDDEN_DOCKER_HOST != null) ? OVERRIDDEN_DOCKER_HOST : DEFAULT_DOCKER_HOST; // Assuming insecure docker engine DockerClientConfig config = DefaultDockerClientConfig.createDefaultConfigBuilder().withDockerHost(dockerHost).build(); // using jaxrs/jersey implementation here (netty impl is also available) DockerCmdExecFactory dockerCmdExecFactory = new JerseyDockerCmdExecFactory().withConnectTimeout(1000) .withMaxTotalConnections(100).withMaxPerRouteConnections(10); dockerClient = DockerClientBuilder.getInstance(config).withDockerCmdExecFactory(dockerCmdExecFactory).build(); await().atMost(60, SECONDS).until(this::servicesUp); }
Example #3
Source File: DockerImpl.java From vespa with Apache License 2.0 | 5 votes |
private static DockerClient createDockerClient() { JerseyDockerCmdExecFactory dockerFactory = new JerseyDockerCmdExecFactory() .withMaxPerRouteConnections(10) .withMaxTotalConnections(100) .withConnectTimeout((int) Duration.ofSeconds(100).toMillis()) .withReadTimeout((int) Duration.ofMinutes(30).toMillis()); DockerClientConfig dockerClientConfig = new DefaultDockerClientConfig.Builder() .withDockerHost("unix:///var/run/docker.sock") .build(); return DockerClientImpl.getInstance(dockerClientConfig) .withDockerCmdExecFactory(dockerFactory); }
Example #4
Source File: Docker.java From kurento-java with Apache License 2.0 | 5 votes |
public DockerClient getClient() { if (client == null) { synchronized (this) { if (client == null) { execFactory = new JerseyDockerCmdExecFactory(); DockerCmdExecFactory dockerCmdExecFactory = execFactory.withMaxPerRouteConnections(100); client = DockerClientBuilder.getInstance(dockerServerUrl).withDockerCmdExecFactory(dockerCmdExecFactory).build(); } } } return client; }
Example #5
Source File: DockerClientBuilder.java From docker-java with Apache License 2.0 | 4 votes |
/** * * @deprecated no replacement, use one of {@link DockerHttpClient} */ @Deprecated public static DockerCmdExecFactory getDefaultDockerCmdExecFactory() { return new JerseyDockerCmdExecFactory(); }