Class DockerClientService
- java.lang.Object
-
- com.bmuschko.gradle.docker.internal.services.DockerClientService
-
- All Implemented Interfaces:
AutoCloseable
,BuildService<DockerClientService.Params>
public abstract class DockerClientService extends Object implements BuildService<DockerClientService.Params>, AutoCloseable
Build service for Docker client.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
DockerClientService.Params
Parameters for build service.
-
Constructor Summary
Constructors Constructor Description DockerClientService(ObjectFactory objects)
Constructor for Docker client service.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
com.github.dockerjava.api.DockerClient
getDockerClient(Provider<String> urlProvider, Provider<Directory> certPathProvider, Provider<String> apiVersionProvider)
Returns the Docker client.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.gradle.api.services.BuildService
getParameters
-
-
-
-
Constructor Detail
-
DockerClientService
@Inject public DockerClientService(ObjectFactory objects)
Constructor for Docker client service.- Parameters:
objects
- The object factory
-
-
Method Detail
-
getDockerClient
public com.github.dockerjava.api.DockerClient getDockerClient(Provider<String> urlProvider, Provider<Directory> certPathProvider, Provider<String> apiVersionProvider)
Returns the Docker client.- Parameters:
urlProvider
- Docker client urlcertPathProvider
- Docker client certificate pathapiVersionProvider
- Docker client api version- Returns:
- Docker client
-
close
public void close() throws Exception
- Specified by:
close
in interfaceAutoCloseable
- Throws:
Exception
-
-