Package com.bmuschko.gradle.docker
Class DockerRegistryCredentials
- java.lang.Object
-
- com.bmuschko.gradle.docker.DockerRegistryCredentials
-
public class DockerRegistryCredentials extends Object
The extension for configuring the Docker communication via the remote API through theDockerRemoteApiPlugin
.The following example demonstrates the use of the extension in a build script using the Groovy DSL:
docker { registryCredentials { username = 'bmuschko' password = 'pwd' } }
-
-
Field Summary
Fields Modifier and Type Field Description static String
DEFAULT_URL
The registry URL used as default value for the propertyurl
.
-
Constructor Summary
Constructors Constructor Description DockerRegistryCredentials(ObjectFactory objectFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PasswordCredentials
asPasswordCredentials()
Translates the Docker registry credentials into aPasswordCredentials
.Property<String>
getEmail()
Registry email address needed to push images.Property<String>
getPassword()
Registry password needed to push images.Property<String>
getUrl()
Registry URL needed to push images.Property<String>
getUsername()
Registry username needed to push images.
-
-
-
Field Detail
-
DEFAULT_URL
public static final String DEFAULT_URL
The registry URL used as default value for the propertyurl
.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DockerRegistryCredentials
@Inject public DockerRegistryCredentials(ObjectFactory objectFactory)
-
-
Method Detail
-
getUrl
@Input public final Property<String> getUrl()
Registry URL needed to push images.Defaults to "https://index.docker.io/v1/".
-
getUsername
@Input @Optional public final Property<String> getUsername()
Registry username needed to push images.Defaults to null.
-
getPassword
@Input @Optional public final Property<String> getPassword()
Registry password needed to push images.Defaults to null.
-
getEmail
@Input @Optional public final Property<String> getEmail()
Registry email address needed to push images.Defaults to null.
-
asPasswordCredentials
public PasswordCredentials asPasswordCredentials()
Translates the Docker registry credentials into aPasswordCredentials
.- Since:
- 4.0.0
-
-