Skip to content

Latest commit

 

History

History
130 lines (103 loc) · 4.08 KB

README.md

File metadata and controls

130 lines (103 loc) · 4.08 KB

Forks Stargazers Issues

Paketo Buildpacks Multi-Architecture Builder

dashaun/builder-arm

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 and paketobuildpacks/builder:tiny for AMD64
  • dashaun/builder:base a manifest delivering dashaun/builder-arm:base for ARM64 and paketobuildpacks/builder:base for AMD64

The dashaun/builder-arm:base just changes the stack, it does not include the all of the 'base' buildpacks

Quick Start Maven

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

Quick Start Gradle

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

Quick Start Validation

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"
}

Goals of this repository

  • Deliver a buildpack that can be used with Spring Boot 3 and GraalVM 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!

GitHub Action Workflow & CirleCI Workflow

I'm no longer using self-hosted infrastructure! ARM64 workflows now use CircleCI!

See Also

Thank you