@CompileStatic class DockerExtension extends Object
The extension for configuring the Docker communication via the remote API through the DockerRemoteApiPlugin.
Other convention plugins like the DockerJavaApplicationPlugin and DockerSpringBootApplicationPlugin may further extend this extension as nested configuration elements.
The following example demonstrates the use of the extension in a build script using the Groovy DSL:
docker {
url = 'https://192.168.59.103:2376'
}
| Type | Name and description |
|---|---|
Property<String> |
apiVersionThe remote API version. |
DirectoryProperty |
certPathThe path to certificates for communicating with Docker over SSL. |
DockerRegistryCredentials |
registryCredentialsThe target Docker registry credentials. |
Property<String> |
urlThe server URL to connect to via Docker’s remote API. |
| Constructor and description |
|---|
DockerExtension
(ObjectFactory objectFactory) |
| Type Params | Return Type | Name and description |
|---|---|---|
|
void |
registryCredentials(Action<? super DockerRegistryCredentials> action)Configures the target Docker registry credentials. |
The remote API version. For most cases this can be left null.
The path to certificates for communicating with Docker over SSL.
Defaults to value of environment variable DOCKER_CERT_PATH if set.
The target Docker registry credentials.
The server URL to connect to via Docker’s remote API.
Defaults to unix:///var/run/docker.sock for Unix systems and tcp://127.0.0.1:2375 for Windows systems.
Configures the target Docker registry credentials.
action - The action against the Docker registry credentialsGroovy Documentation