You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit qualifies examples of configuring the CNB builder to clarify
that the examples apply to use of the default Paketo builder, and adds links
to the official Paketo docs for more details.
Fixesgh-19967
Copy file name to clipboardExpand all lines: spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/docs/asciidoc/packaging-oci-image.adoc
+9-7Lines changed: 9 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,10 @@
1
1
[[build-image]]
2
2
== Packaging OCI Images
3
-
The plugin can create an https://github.com/opencontainers/image-spec[OCI image] from executable jars using https://buildpacks.io[Cloud Native Buildpacks].
3
+
The plugin can create an https://github.com/opencontainers/image-spec[OCI image] from executable jars using https://buildpacks.io[Cloud Native Buildpacks] (CNB).
4
4
Images can be built using the `bootBuildImage` task.
5
5
6
-
NOTE: For security reasons, images build and run as non-root users, see https://buildpacks.io/docs/reference/spec/platform-api/#users[this section fore more details].
6
+
NOTE: For security reasons, images build and run as non-root users.
7
+
See the {buildpacks-reference}/reference/spec/platform-api/#users[CNB specification] for more details.
7
8
8
9
The task is automatically created when the `java` plugin is applied and is an instance of {boot-build-image-javadoc}[`BootBuildImage`].
9
10
@@ -81,8 +82,8 @@ The following table summarizes the available properties and their default values
81
82
|===
82
83
83
84
NOTE: The plugin detects the target Java compatibility of the project using the JavaPlugin's `targetCompatibility` property.
84
-
By default, the plugin instructs the buildpacks to install the same Java version.
85
-
You can override this behaviour by setting the `BP_JVM_VERSION` environment variable, see <<build-image-example-builder-configuration,builder configuration>>.
85
+
When using the default Paketo builder and buildpacks, the plugin instructs the buildpacks to install the same Java version.
86
+
You can override this behaviour as shown in the <<build-image-example-builder-configuration,builder configuration>> examples.
If the builder exposes configuration options, those can be set using the `environment` property.
124
125
125
-
The following example assumes that the default builder recognizes a `BP_JVM_VERSION` property.
126
-
This property is typically used to customize the JDK version the image should use by specifying the major version and a wildcard for the rest of the version:
126
+
The following is an example of {paketo-java-reference}/#configuring-the-jvm-version[configuring the JVM version] used by the Paketo Java buildpacks at build time:
Refer to the {paketo-java-reference}[Paketo documentation] for additional configuration options supported by Paketo Java buildpacks.
141
+
140
142
If there is a network proxy between the Docker daemon the builder runs in and network locations that buildpacks download artifacts from, you will need to configure the builder to use the proxy.
141
-
When using the default builder, this can be accomplished by setting the `HTTPS_PROXY` and/or `HTTP_PROXY` environment variables as show in the following example:
143
+
When using the Paketo builder, this can be accomplished by setting the `HTTPS_PROXY` and/or `HTTP_PROXY` environment variables as show in the following example:
Copy file name to clipboardExpand all lines: spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/asciidoc/packaging-oci-image.adoc
+9-7Lines changed: 9 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,10 @@
1
1
[[build-image]]
2
2
== Packaging OCI Images
3
-
The plugin can create an https://github.com/opencontainers/image-spec[OCI image] using https://buildpacks.io/[Cloud Native Buildpacks].
3
+
The plugin can create an https://github.com/opencontainers/image-spec[OCI image] using https://buildpacks.io/[Cloud Native Buildpacks] (CNB).
4
4
Images can be built using the `build-image` goal.
5
5
6
-
NOTE: For security reasons, images build and run as non-root users, see https://buildpacks.io/docs/reference/spec/platform-api/#users[this section fore more details].
6
+
NOTE: For security reasons, images build and run as non-root users.
7
+
See the {buildpacks-reference}/reference/spec/platform-api/#users[CNB specification] for more details.
7
8
8
9
The easiest way to get started is to invoke `mvn spring-boot:build-image` on a project.
9
10
It is possible to automate the creation of an image whenever the `package` phase is invoked, as shown in the following example:
@@ -104,8 +105,8 @@ The following table summarizes the available parameters and their default values
104
105
|===
105
106
106
107
NOTE: The plugin detects the target Java compatibility of the project using the compiler's plugin configuration or the `maven.compiler.target` property.
107
-
By default, the plugin instructs the buildpacks to install the same Java version.
108
-
You can override this behaviour by setting the `BP_JVM_VERSION` environment variable, see <<build-image-example-builder-configuration,builder configuration>>.
108
+
When using the default Paketo builder and buildpacks, the plugin instructs the buildpacks to install the same Java version.
109
+
You can override this behaviour as shown in the <<build-image-example-builder-configuration,builder configuration>> examples.
109
110
110
111
For more details, see also <<build-image-example-custom-image-builder,custom image builder>> and <<build-image-example-custom-image-name,custom image name>>.
111
112
@@ -158,8 +159,7 @@ The builder and run image can be specified on the command line as well, as shown
158
159
==== Builder Configuration
159
160
If the builder exposes configuration options using environment variables, those can be set using the `env` attributes.
160
161
161
-
The following example assumes that the default builder recognizes a `BP_JVM_VERSION` property.
162
-
This property is typically used to customize the JDK version the image should use by specifying the major version and a wildcard for the rest of the version:
162
+
The following is an example of {paketo-java-reference}/#configuring-the-jvm-version[configuring the JVM version] used by the Paketo Java buildpacks at build time:
163
163
164
164
[source,xml,indent=0,subs="verbatim,attributes"]
165
165
----
@@ -183,8 +183,10 @@ This property is typically used to customize the JDK version the image should us
183
183
</project>
184
184
----
185
185
186
+
Refer to the {paketo-java-reference}[Paketo documentation] for additional configuration options supported by Paketo Java buildpacks.
187
+
186
188
If there is a network proxy between the Docker daemon the builder runs in and network locations that buildpacks download artifacts from, you will need to configure the builder to use the proxy.
187
-
When using the default builder, this can be accomplished by setting the `HTTPS_PROXY` and/or `HTTP_PROXY` environment variables as show in the following example:
189
+
When using the Paketo builder, this can be accomplished by setting the `HTTPS_PROXY` and/or `HTTP_PROXY` environment variables as show in the following example:
0 commit comments