This repo is used to generate:
- dashaun/builder-arm a modified version of
paketobuildpacks/builder
that works with ARM64 architectures like M1, M2, Raspberry Pi, and Rock Pi - dashaun/builder:tiny a manifest delivering
dashaun/builder-arm:tiny
for ARM64 andpaketobuildpacks/builder:tiny
for AMD64 - dashaun/builder:base a manifest delivering
dashaun/builder-arm:base
for ARM64 andpaketobuildpacks/builder:base
for AMD64
The dashaun/builder-arm:base just changes the stack, it does not include the all of the 'base' buildpacks
Create a Spring Boot project:
curl https://start.spring.io/starter.tgz -d dependencies=web,actuator,native -d javaVersion=21 -d bootVersion=3.2.4 -d type=maven-project | tar -xzf -
In the pom.xml replace this:
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
with this:
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<image>
<builder>dashaun/builder:tiny</builder>
</image>
</configuration>
</plugin>
</plugins>
</build>
Create OCI images just like you would with paketobuildpacks/builder:tiny
:
./mvnw -Pnative spring-boot:build-image
Create a Spring Boot project:
curl https://start.spring.io/starter.tgz -d dependencies=web,actuator,native -d javaVersion=21 -d bootVersion=3.1.4 -d type=gradle-project | tar -xzf -
In the build.gradle add this:
tasks.named("bootBuildImage") {
builder = "dashaun/builder:tiny"
environment = ["BP_NATIVE_IMAGE" : "true"]
}
Create OCI images just like you would with paketobuildpacks/builder:tiny
:
./gradlew bootBuildImage
Test the image by running it with docker:
docker run --rm -d -p 8080:8080 demo:0.0.1-SNAPSHOT
Validate the image:
http :8080/actuator/health
HTTP/1.1 200
Connection: keep-alive
Content-Type: application/vnd.spring-boot.actuator.v3+json
Date: Sat, 27 Apr 2023 05:04:36 GMT
Keep-Alive: timeout=60
Transfer-Encoding: chunked
{
"status": "UP"
}
- Deliver a buildpack that can be used with
Spring Boot 3
andGraalVM
on ARM64 architecture - Deliver a buildpack that can be used the same way on ARM64 and AMD64
- Help deliver ARM64 and multi-architecture support upstream to Paketo
Please use it and provide feedback! Pull requests are welcome!
I'm no longer using self-hosted infrastructure! ARM64 workflows now use CircleCI!