Polish "Support authentication to private Docker registry"
See gh-22972
This commit is contained in:
@@ -59,6 +59,37 @@ On Linux and macOS, these environment variables can be set using the command `ev
|
||||
|
||||
|
||||
|
||||
[[build-image-docker-registry]]
|
||||
=== Docker Registry
|
||||
If the Docker images specified by the `builder` or `runImage` parameters are stored in a private Docker image registry that requires authentication, the authentication credentials can be provided using `docker.registry` parameters.
|
||||
Parameters are provided for user authentication or identity token authentication.
|
||||
Consult the documentation for the Docker registry being used to store builder or run images for further information on supported authentication methods.
|
||||
|
||||
The following table summarizes the available parameters:
|
||||
|
||||
|===
|
||||
| Parameter | Description
|
||||
|
||||
| `username`
|
||||
| Username for the Docker image registry user. Required for user authentication.
|
||||
|
||||
| `password`
|
||||
| Password for the Docker image registry user. Required for user authentication.
|
||||
|
||||
| `url`
|
||||
| Address of the Docker image registry. Optional for user authentication.
|
||||
|
||||
| `email`
|
||||
| E-mail address for the Docker image registry user. Optional for user authentication.
|
||||
|
||||
| `token`
|
||||
| Identity token for the Docker image registry user. Required for token authentication.
|
||||
|===
|
||||
|
||||
For more details, see also <<build-image-example-docker,examples>>.
|
||||
|
||||
|
||||
|
||||
[[build-image-customization]]
|
||||
=== Image Customizations
|
||||
The plugin invokes a {buildpacks-reference}/concepts/components/builder/[builder] to orchestrate the generation of an image.
|
||||
@@ -252,3 +283,57 @@ The image name can be specified on the command line as well, as shown in this ex
|
||||
$ mvn spring-boot:build-image -Dspring-boot.build-image.imageName=example.com/library/my-app:v1
|
||||
----
|
||||
|
||||
|
||||
|
||||
[[build-image-example-docker]]
|
||||
==== Docker Configuration
|
||||
If the builder or run image are stored in a private Docker registry that supports user authentication, authentication details can be provided as shown in the following example:
|
||||
|
||||
[source,xml,indent=0,subs="verbatim,attributes"]
|
||||
----
|
||||
<project>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<version>{gradle-project-version}</version>
|
||||
<configuration>
|
||||
<docker>
|
||||
<registry>
|
||||
<username>user</username>
|
||||
<password>secret</password>
|
||||
<url>https://docker.example.com/v1/</url>
|
||||
<email>user@example.com</email>
|
||||
</registry>
|
||||
</docker>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
----
|
||||
|
||||
If the builder or run image is stored in a private Docker registry that supports token authentication, the token value can be provided as shown in the following example:
|
||||
|
||||
[source,xml,indent=0,subs="verbatim,attributes"]
|
||||
----
|
||||
<project>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<version>{gradle-project-version}</version>
|
||||
<configuration>
|
||||
<docker>
|
||||
<registry>
|
||||
<token>9cbaf023786cd7...</token>
|
||||
</registry>
|
||||
</docker>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
----
|
||||
|
||||
Reference in New Issue
Block a user