Skip to content

Commit 648789e

Browse files
committed
Document that buildpacks use non-root users
Closes gh-21122
1 parent d2eeb95 commit 648789e

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/docs/asciidoc/packaging-oci-image.adoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
== Packaging OCI Images
33
The plugin can create an https://github.com/opencontainers/image-spec[OCI image] from executable jars using https://buildpacks.io[Cloud Native Buildpacks].
44
Images can be built using the `bootBuildImage` task.
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].
7+
58
The task is automatically created when the `java` plugin is applied and is an instance of {boot-build-image-javadoc}[`BootBuildImage`].
69

710
NOTE: The `bootBuildImage` task can not be used with a <<packaging-executable-configuring-launch-script, fully executable Spring Boot archive>> that includes a launch script.

spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/asciidoc/packaging-oci-image.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
The plugin can create an https://github.com/opencontainers/image-spec[OCI image] using https://buildpacks.io/[Cloud Native Buildpacks].
44
Images can be built using the `build-image` goal.
55

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].
7+
68
The easiest way to get started is to invoke `mvn spring-boot:build-image` on a project.
79
It is possible to automate the creation of an image whenever the `package` phase is invoked, as shown in the following example:
810

0 commit comments

Comments
 (0)