Deployment Manual / Version 2404
Table Of ContentsThe Jib plugin has an extension mechanism and by default there are some extensions active. One of them is the Spring Boot
extension, which takes care of reading the layer manifest of the Spring Boot plugin. The layered JARs mechanism was
introduced with version 2.3
of Spring Boot to add application resources in layers, grouped by their nature to change.
For more information, see the section about
Layered Jar in the official plugin documentation.
Another extension, we make use of in our setup is the jib-ownership-extension
. This extension can be used to set the ownership of
files, see the
jib ownership extension documentation
for more details.
<plugin> <groupId>com.google.cloud.tools</groupId> <artifactId>jib-maven-plugin</artifactId> <version>3.4.0</version> <dependencies> <dependency> <groupId>com.google.cloud.tools</groupId> <artifactId>jib-ownership-extension-maven</artifactId> <version>0.1.0</version> </dependency> </dependencies> <configuration> <pluginExtensions> <pluginExtension> <implementation>com.google.cloud.tools.jib.maven.extension.ownership.JibOwnershipExtension </implementation> <configuration implementation="com.google.cloud.tools.jib.maven.extension.ownership.Configuration"> <rules> <rule> <glob>/coremedia**</glob> <ownership>1000:1000</ownership> </rule> </rules> </configuration> </pluginExtension> </pluginExtensions> </configuration> </plugin>
The configuration of the plugin is split up into two parts:
A generic configuration
The configuration to build the default image.