Add Docker configuration authentication to Maven and Gradle plugins
Update the Maven and Gradle plugins to make use of the new Docker
configuration authentication support.
See gh-45269
Signed-off-by: Dmytro Nosan <dimanosan@gmail.com>
Co-authored-by: Phillip Webb <phil.webb@broadcom.com>
@ -100,6 +100,18 @@ The following table summarizes the available properties for `docker.builderRegis
@@ -100,6 +100,18 @@ The following table summarizes the available properties for `docker.builderRegis
For more details, see also xref:packaging-oci-image.adoc#build-image.examples.docker[examples].
[NOTE]
====
If credentials are not provided, the plugin reads the user's existing Docker configuration file (typically located at `$HOME/.docker/config.json`) to determine authentication methods.
Using these methods, the plugin attempts to provide authentication credentials for the requested image.
The plugin supports the following authentication methods:
- *Credential Helpers*: External tools configured in the Docker configuration file to provide credentials for specific registries. For example, tools like `osxkeychain` or `ecr-login` handle authentication for certain registries.
- *Credential Store*: A default fallback mechanism that securely stores and retrieves credentials (e.g., `desktop` for Docker Desktop).
- *Static Credentials*: Credentials that are stored directly in the Docker configuration file under the `auths` section.
@ -115,6 +115,18 @@ The following table summarizes the available parameters for `docker.builderRegis
@@ -115,6 +115,18 @@ The following table summarizes the available parameters for `docker.builderRegis
For more details, see also xref:build-image.adoc#build-image.examples.docker[examples].
[NOTE]
====
If credentials are not provided, the plugin reads the user's existing Docker configuration file (typically located at `$HOME/.docker/config.json`) to determine authentication methods.
Using these methods, the plugin attempts to provide authentication credentials for the requested image.
The plugin supports the following authentication methods:
- *Credential Helpers*: External tools configured in the Docker configuration file to provide credentials for specific registries. For example, tools like `osxkeychain` or `ecr-login` handle authentication for certain registries.
- *Credential Store*: A default fallback mechanism that securely stores and retrieves credentials (e.g., `desktop` for Docker Desktop).
- *Static Credentials*: Credentials that are stored directly in the Docker configuration file under the `auths` section.