use of org.eclipse.jkube.kit.build.service.docker.config.DockerMachineConfiguration in project jkube by eclipse.
the class DockerAccessFactory method getDefaultDockerHostProviders.
/**
* Return a list of providers which could delive connection parameters from
* calling external commands. For this plugin this is docker-machine, but can be overridden
* to add other config options, too.
*
* @return list of providers or <code>null</code> if none are applicable
*/
private List<DockerConnectionDetector.DockerHostProvider> getDefaultDockerHostProviders(DockerAccessContext dockerAccessContext, KitLogger log) {
DockerMachineConfiguration config = dockerAccessContext.getMachine();
if (dockerAccessContext.isSkipMachine()) {
config = null;
} else if (config == null) {
Properties projectProps = dockerAccessContext.getProjectProperties();
if (projectProps.containsKey(DockerMachineConfiguration.DOCKER_MACHINE_NAME_PROP)) {
config = new DockerMachineConfiguration(projectProps.getProperty(DockerMachineConfiguration.DOCKER_MACHINE_NAME_PROP), projectProps.getProperty(DockerMachineConfiguration.DOCKER_MACHINE_AUTO_CREATE_PROP), projectProps.getProperty(DockerMachineConfiguration.DOCKER_MACHINE_REGENERATE_CERTS_AFTER_START_PROP));
}
}
List<DockerConnectionDetector.DockerHostProvider> ret = new ArrayList<>();
ret.add(new DockerMachine(log, config));
return ret;
}
Aggregations