dev-resources.site
for different kinds of informations.
Changing the base Linux image in spring-boot:build-image
Published at
4/12/2023
Categories
springbootmavenplugin
springboot
buildpack
docker
Author
Eduardo Issao Ito
The spring-boot-maven-plugin can create an OCI image from a jar or war file using Cloud Native Buildpacks.
By default it uses a builder called paketobuildpacks/builder:base
which is based on Ubuntu 18.04 and is suitable for running a Spring Boot application.
But you can choose another builder, for example:
-
paketobuildpacks/builder:tiny
is a lot smaller because it has the minimum requirements to run you application, evensh
is absent (you can't open a terminal in this image) -
paketobuildpacks/builder:full
its the oposite of tiny, containing a lot of tools and commands. -
paketobuildpacks/builder-jammy-base
is based on Ubuntu 22.04
The list of all builders is available in Paketo Builders Reference.
It's just a matter of configuring the builder in pom.xml
:
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<image>
<builder>paketobuildpacks/builder-jammy-tiny</builder>
</image>
</configuration>
</plugin>
Articles
12 articles in total
Resumo Kubernetes
read article
Check for newer versions of dependencies in pom.xml
read article
Changing the JVM in spring-boot:build-image
read article
Changing the base Linux image in spring-boot:build-image
currently reading
Custom Root CA in spring-boot:build-image
read article
Getting http status in curl
read article
DB2 backup/restore schema
read article
Using MTLS
read article
Convert OpenAPI spec to JSON Schema
read article
Json validation with OpenAPI Schema
read article
SFTP server in Ubuntu
read article
Using multiple JMS servers with Spring Boot
read article
Featured ones: