Search in sources :

Example 1 with DockerAccessWithHcClient

use of org.eclipse.jkube.kit.build.service.docker.access.hc.DockerAccessWithHcClient in project jkube by eclipse.

the class DockerAccessFactory method createDockerAccess.

public DockerAccess createDockerAccess(DockerAccessContext dockerAccessContext) {
    try {
        DockerConnectionDetector dockerConnectionDetector = createDockerConnectionDetector(dockerAccessContext, dockerAccessContext.getLog());
        DockerConnectionDetector.ConnectionParameter connectionParam = dockerConnectionDetector.detectConnectionParameter(dockerAccessContext.getDockerHost(), dockerAccessContext.getCertPath());
        DockerAccess access = new DockerAccessWithHcClient(connectionParam.getUrl(), connectionParam.getCertPath(), dockerAccessContext.getMaxConnections(), dockerAccessContext.getLog());
        access.start();
        setDockerHostAddressProperty(dockerAccessContext, connectionParam.getUrl());
        return access;
    } catch (IOException e) {
        throw new IllegalStateException("Cannot create docker access object ", e);
    }
}
Also used : DockerAccess(org.eclipse.jkube.kit.build.service.docker.access.DockerAccess) DockerAccessWithHcClient(org.eclipse.jkube.kit.build.service.docker.access.hc.DockerAccessWithHcClient) DockerConnectionDetector(org.eclipse.jkube.kit.build.service.docker.access.DockerConnectionDetector) IOException(java.io.IOException)

Aggregations

IOException (java.io.IOException)1 DockerAccess (org.eclipse.jkube.kit.build.service.docker.access.DockerAccess)1 DockerConnectionDetector (org.eclipse.jkube.kit.build.service.docker.access.DockerConnectionDetector)1 DockerAccessWithHcClient (org.eclipse.jkube.kit.build.service.docker.access.hc.DockerAccessWithHcClient)1