paketo-buildpacks / health-checker

A Cloud Native Buildpack that provides a health check binary compatible with Docker health checks
Apache License 2.0
6 stars 0 forks source link

THC ignoring aarch arguments #149

Closed mikerimov closed 1 month ago

mikerimov commented 1 month ago

Building an Intel Image on a M1 Mac results in an aarch64 layer added to an intel image.

Current Behavior

Buildpack logs while building:

[INFO] --- spring-boot:3.3.3:build-image (build-image) @ gaggle-text-filtering-service-server-jaxrs ---
[INFO] Building image '796286304777.dkr.ecr.us-west-2.amazonaws.com/gaggle/text-filtering-service:c2ef30eea78aff2a9398e2d48349763001966f87'
[INFO] 
[INFO]  > Pulling builder image 'docker.io/paketobuildpacks/builder-jammy-base:0.4.325' 0%
[INFO]  > Pulling builder image 'docker.io/paketobuildpacks/builder-jammy-base:0.4.325' 2%
[INFO]  > Pulling builder image 'docker.io/paketobuildpacks/builder-jammy-base:0.4.325' 3%
[INFO]  > Pulling builder image 'docker.io/paketobuildpacks/builder-jammy-base:0.4.325' 4%
[INFO]  > Pulling builder image 'docker.io/paketobuildpacks/builder-jammy-base:0.4.325' 7%
[INFO]  > Pulling builder image 'docker.io/paketobuildpacks/builder-jammy-base:0.4.325' 13%
[INFO]  > Pulling builder image 'docker.io/paketobuildpacks/builder-jammy-base:0.4.325' 25%
[INFO]  > Pulling builder image 'docker.io/paketobuildpacks/builder-jammy-base:0.4.325' 33%
[INFO]  > Pulling builder image 'docker.io/paketobuildpacks/builder-jammy-base:0.4.325' 40%
[INFO]  > Pulling builder image 'docker.io/paketobuildpacks/builder-jammy-base:0.4.325' 44%
[INFO]  > Pulling builder image 'docker.io/paketobuildpacks/builder-jammy-base:0.4.325' 50%
[INFO]  > Pulling builder image 'docker.io/paketobuildpacks/builder-jammy-base:0.4.325' 55%
[INFO]  > Pulling builder image 'docker.io/paketobuildpacks/builder-jammy-base:0.4.325' 59%
[INFO]  > Pulling builder image 'docker.io/paketobuildpacks/builder-jammy-base:0.4.325' 68%
[INFO]  > Pulling builder image 'docker.io/paketobuildpacks/builder-jammy-base:0.4.325' 76%
[INFO]  > Pulling builder image 'docker.io/paketobuildpacks/builder-jammy-base:0.4.325' 82%
[INFO]  > Pulling builder image 'docker.io/paketobuildpacks/builder-jammy-base:0.4.325' 89%
[INFO]  > Pulling builder image 'docker.io/paketobuildpacks/builder-jammy-base:0.4.325' 100%
[INFO]  > Pulled builder image 'paketobuildpacks/builder-jammy-base@sha256:a96e159e896fb1c65d4da724dc830370f13a8747ad0dec058d484e065e2ec420'
[INFO]  > Pulling run image 'docker.io/paketobuildpacks/run-jammy-base:latest' 100%
[INFO]  > Pulled run image 'paketobuildpacks/run-jammy-base@sha256:24004ccce1ee9c30234e72807af1d294c8e0a3fb54ce1da5c1859cca90cb4e04'
[INFO]  > Pulling buildpack image 'docker.io/paketobuildpacks/amazon-corretto:8.3.0' 0%
[INFO]  > Pulling buildpack image 'docker.io/paketobuildpacks/amazon-corretto:8.3.0' 100%
[INFO]  > Pulled buildpack image 'paketobuildpacks/amazon-corretto@sha256:83cfa97e87698fa7ecff23c33f329a26c44a95c21cf09a193408d8ca7d9ca8fe'
[INFO]  > Pulling buildpack image 'docker.io/paketobuildpacks/java:15.2.0' 0%
[INFO]  > Pulling buildpack image 'docker.io/paketobuildpacks/java:15.2.0' 19%
[INFO]  > Pulling buildpack image 'docker.io/paketobuildpacks/java:15.2.0' 46%
[INFO]  > Pulling buildpack image 'docker.io/paketobuildpacks/java:15.2.0' 69%
[INFO]  > Pulling buildpack image 'docker.io/paketobuildpacks/java:15.2.0' 100%
[INFO]  > Pulled buildpack image 'paketobuildpacks/java@sha256:bdb87104cf4940569b49281e0c3fad460ac1986b6dbf3b3740007d35274ad363'
[INFO]  > Pulling buildpack image 'docker.io/paketobuildpacks/health-checker:2.2.0' 0%
[INFO]  > Pulling buildpack image 'docker.io/paketobuildpacks/health-checker:2.2.0' 100%
[INFO]  > Pulled buildpack image 'paketobuildpacks/health-checker@sha256:a61adafdb92549b9492bd87e597df0ae3733f253637f0e3be022360f28fb7fd5'
[INFO]  > Executing lifecycle version v0.20.1
[INFO]  > Using build cache volume 'pack-cache-f3c8f1ff798c.build'
[INFO] 
[INFO]  > Running creator
[INFO]     [creator]     ===> ANALYZING
[INFO]     [creator]     Image with name "796286304777.dkr.ecr.us-west-2.amazonaws.com/gaggle/text-filtering-service:c2ef30eea78aff2a9398e2d48349763001966f87" not found
[INFO]     [creator]     ===> DETECTING
[INFO]     [creator]     target distro name/version labels not found, reading /etc/os-release file
[INFO]     [creator]     target distro name/version labels not found, reading /etc/os-release file
[INFO]     [creator]     8 of 28 buildpacks participating
[INFO]     [creator]     paketo-buildpacks/amazon-corretto   8.3.0
[INFO]     [creator]     paketo-buildpacks/ca-certificates   3.8.4
[INFO]     [creator]     paketo-buildpacks/bellsoft-liberica 10.8.2
[INFO]     [creator]     paketo-buildpacks/syft              1.47.1
[INFO]     [creator]     paketo-buildpacks/executable-jar    6.11.0
[INFO]     [creator]     paketo-buildpacks/dist-zip          5.8.2
[INFO]     [creator]     paketo-buildpacks/spring-boot       5.31.0
[INFO]     [creator]     paketo-buildpacks/health-checker    2.2.0
[INFO]     [creator]     ===> RESTORING
[INFO]     [creator]     Restoring metadata for "paketo-buildpacks/syft:syft" from cache
[INFO]     [creator]     Restoring data for "paketo-buildpacks/syft:syft" from cache
[INFO]     [creator]     Restoring data for SBOM from cache
[INFO]     [creator]     ===> BUILDING
[INFO]     [creator]     target distro name/version labels not found, reading /etc/os-release file
[INFO]     [creator]     
[INFO]     [creator]     Paketo Buildpack for Amazon Corretto 8.3.0
[INFO]     [creator]       https://github.com/paketo-buildpacks/amazon-corretto
[INFO]     [creator]       Build Configuration:
[INFO]     [creator]         $BP_JVM_JLINK_ARGS           --no-man-pages --no-header-files --strip-debug --compress=1  configure custom link arguments (--output must be omitted)
[INFO]     [creator]         $BP_JVM_JLINK_ENABLED        false                                                        enables running jlink tool to generate custom JRE
[INFO]     [creator]         $BP_JVM_TYPE                 JRE                                                          the JVM type - JDK or JRE
[INFO]     [creator]         $BP_JVM_VERSION              17.*                                                         the Java version
[INFO]     [creator]       Launch Configuration:
[INFO]     [creator]         $BPL_DEBUG_ENABLED           true                                                         enables Java remote debugging support
[INFO]     [creator]         $BPL_DEBUG_PORT              65502                                                        configure the remote debugging port
[INFO]     [creator]         $BPL_DEBUG_SUSPEND           false                                                        configure whether to suspend execution until a debugger has attached
[INFO]     [creator]         $BPL_HEAP_DUMP_PATH                                                                       write heap dumps on error to this path
[INFO]     [creator]         $BPL_JAVA_NMT_ENABLED        true                                                         enables Java Native Memory Tracking (NMT)
[INFO]     [creator]         $BPL_JAVA_NMT_LEVEL          summary                                                      configure level of NMT, summary or detail
[INFO]     [creator]         $BPL_JFR_ARGS                                                                             configure custom Java Flight Recording (JFR) arguments
[INFO]     [creator]         $BPL_JFR_ENABLED             false                                                        enables Java Flight Recording (JFR)
[INFO]     [creator]         $BPL_JMX_ENABLED             true                                                         enables Java Management Extensions (JMX)
[INFO]     [creator]         $BPL_JMX_PORT                5516                                                         configure the JMX port
[INFO]     [creator]         $BPL_JVM_HEAD_ROOM           0                                                            the headroom in memory calculation
[INFO]     [creator]         $BPL_JVM_LOADED_CLASS_COUNT  35% of classes                                               the number of loaded classes in memory calculation
[INFO]     [creator]         $BPL_JVM_THREAD_COUNT        250                                                          the number of threads in memory calculation
[INFO]     [creator]         $JAVA_TOOL_OPTIONS                                                                        the JVM launch flags
[INFO]     [creator]         Using Java version 17.* from BP_JVM_VERSION
[INFO]     [creator]       No valid JRE available, providing matching JDK instead. Using a JDK at runtime has security implications.
[INFO]     [creator]       Corretto JDK 17.0.11: Contributing to layer
[INFO]     [creator]         Downloading from https://corretto.aws/downloads/resources/17.0.11.9.1/amazon-corretto-17.0.11.9.1-linux-x64.tar.gz
[INFO]     [creator]         Verifying checksum
[INFO]     [creator]         Expanding to /layers/paketo-buildpacks_amazon-corretto/jdk
[INFO]     [creator]         Adding 137 container CA certificates to JVM truststore
[INFO]     [creator]         Writing env.build/JAVA_HOME.default
[INFO]     [creator]         Writing env.launch/BPI_APPLICATION_PATH.default
[INFO]     [creator]         Writing env.launch/BPI_JVM_CACERTS.default
[INFO]     [creator]         Writing env.launch/BPI_JVM_CLASS_COUNT.default
[INFO]     [creator]         Writing env.launch/BPI_JVM_SECURITY_PROVIDERS.default
[INFO]     [creator]         Writing env.launch/JAVA_HOME.default
[INFO]     [creator]         Writing env.launch/JAVA_TOOL_OPTIONS.append
[INFO]     [creator]         Writing env.launch/JAVA_TOOL_OPTIONS.delim
[INFO]     [creator]         Writing env.launch/MALLOC_ARENA_MAX.default
[INFO]     [creator]       Launch Helper: Contributing to layer
[INFO]     [creator]         Creating /layers/paketo-buildpacks_amazon-corretto/helper/exec.d/active-processor-count
[INFO]     [creator]         Creating /layers/paketo-buildpacks_amazon-corretto/helper/exec.d/java-opts
[INFO]     [creator]         Creating /layers/paketo-buildpacks_amazon-corretto/helper/exec.d/jvm-heap
[INFO]     [creator]         Creating /layers/paketo-buildpacks_amazon-corretto/helper/exec.d/link-local-dns
[INFO]     [creator]         Creating /layers/paketo-buildpacks_amazon-corretto/helper/exec.d/memory-calculator
[INFO]     [creator]         Creating /layers/paketo-buildpacks_amazon-corretto/helper/exec.d/security-providers-configurer
[INFO]     [creator]         Creating /layers/paketo-buildpacks_amazon-corretto/helper/exec.d/jmx
[INFO]     [creator]         Creating /layers/paketo-buildpacks_amazon-corretto/helper/exec.d/jfr
[INFO]     [creator]         Creating /layers/paketo-buildpacks_amazon-corretto/helper/exec.d/openssl-certificate-loader
[INFO]     [creator]         Creating /layers/paketo-buildpacks_amazon-corretto/helper/exec.d/security-providers-classpath-9
[INFO]     [creator]         Creating /layers/paketo-buildpacks_amazon-corretto/helper/exec.d/debug-9
[INFO]     [creator]         Creating /layers/paketo-buildpacks_amazon-corretto/helper/exec.d/nmt
[INFO]     [creator]       Java Security Properties: Contributing to layer
[INFO]     [creator]         Writing env.launch/JAVA_SECURITY_PROPERTIES.default
[INFO]     [creator]         Writing env.launch/JAVA_TOOL_OPTIONS.append
[INFO]     [creator]         Writing env.launch/JAVA_TOOL_OPTIONS.delim
[INFO]     [creator]     
[INFO]     [creator]     Paketo Buildpack for CA Certificates 3.8.4
[INFO]     [creator]       https://github.com/paketo-buildpacks/ca-certificates
[INFO]     [creator]       Build Configuration:
[INFO]     [creator]         $BP_EMBED_CERTS                    false  Embed certificates into the image
[INFO]     [creator]         $BP_ENABLE_RUNTIME_CERT_BINDING    true   Deprecated: Enable/disable certificate helper layer to add certs at runtime
[INFO]     [creator]         $BP_RUNTIME_CERT_BINDING_DISABLED  false  Disable certificate helper layer to add certs at runtime
[INFO]     [creator]       Launch Helper: Contributing to layer
[INFO]     [creator]         Creating /layers/paketo-buildpacks_ca-certificates/helper/exec.d/ca-certificates-helper
[INFO]     [creator]     
[INFO]     [creator]     Paketo Buildpack for Syft 1.47.1
[INFO]     [creator]       https://github.com/paketo-buildpacks/syft
[INFO]     [creator]     
[INFO]     [creator]     Paketo Buildpack for Executable JAR 6.11.0
[INFO]     [creator]       https://github.com/paketo-buildpacks/executable-jar
[INFO]     [creator]       Command "packages" is deprecated, use `syft scan` instead
[INFO]     [creator]       Class Path: Contributing to layer
[INFO]     [creator]         Writing env/CLASSPATH.delim
[INFO]     [creator]         Writing env/CLASSPATH.prepend
[INFO]     [creator]       Process types:
[INFO]     [creator]         executable-jar: java org.springframework.boot.loader.launch.JarLauncher (direct)
[INFO]     [creator]         task:           java org.springframework.boot.loader.launch.JarLauncher (direct)
[INFO]     [creator]         web:            java org.springframework.boot.loader.launch.JarLauncher (direct)
[INFO]     [creator]     
[INFO]     [creator]     Paketo Buildpack for Spring Boot 5.31.0
[INFO]     [creator]       https://github.com/paketo-buildpacks/spring-boot
[INFO]     [creator]       Build Configuration:
[INFO]     [creator]         $BPL_JVM_CDS_ENABLED                 false  whether to enable CDS optimizations at runtime
[INFO]     [creator]         $BPL_SPRING_AOT_ENABLED              false  whether to enable Spring AOT at runtime
[INFO]     [creator]         $BP_JVM_CDS_ENABLED                  false  whether to enable CDS & perform JVM training run
[INFO]     [creator]         $BP_SPRING_AOT_ENABLED               false  whether to enable Spring AOT
[INFO]     [creator]         $BP_SPRING_CLOUD_BINDINGS_DISABLED   true   whether to contribute Spring Boot cloud bindings support
[INFO]     [creator]         $BP_SPRING_CLOUD_BINDINGS_VERSION    1      default version of Spring Cloud Bindings library to contribute
[INFO]     [creator]       Launch Configuration:
[INFO]     [creator]         $BPL_SPRING_CLOUD_BINDINGS_DISABLED  true   whether to auto-configure Spring Boot environment properties from bindings
[INFO]     [creator]         $BPL_SPRING_CLOUD_BINDINGS_ENABLED   true   Deprecated - whether to auto-configure Spring Boot environment properties from bindings
[INFO]     [creator]       Creating slices from layers index
[INFO]     [creator]         dependencies (46.9 MB)
[INFO]     [creator]         spring-boot-loader (457.0 KB)
[INFO]     [creator]         snapshot-dependencies (0.0 B)
[INFO]     [creator]         application (382.4 KB)
[INFO]     [creator]       Web Application Type: Contributing to layer
[INFO]     [creator]         Servlet web application detected
[INFO]     [creator]         Writing env.launch/BPL_JVM_THREAD_COUNT.default
[INFO]     [creator]       4 application slices
[INFO]     [creator]       Image labels:
[INFO]     [creator]         org.opencontainers.image.title
[INFO]     [creator]         org.opencontainers.image.version
[INFO]     [creator]         org.springframework.boot.version
[INFO]     [creator]     Warning: BOM table is deprecated in this buildpack api version, though it remains supported for backwards compatibility. Buildpack authors should write BOM information to <layer>.sbom.<ext>, launch.sbom.<ext>, or build.sbom.<ext>.
[INFO]     [creator]     
[INFO]     [creator]     Paketo Buildpack for Health Checkers 2.2.0
[INFO]     [creator]       https://github.com/paketo-buildpacks/health-checker
[INFO]     [creator]       Build Configuration:
[INFO]     [creator]         $BP_HEALTH_CHECKER_DEPENDENCY  thc   which health checker to contribute
[INFO]     [creator]         $BP_HEALTH_CHECKER_ENABLED     true  contributes a health checker if enabled
[INFO]     [creator]       Tiny Health Checker 0.29.0: Contributing to layer
[INFO]     [creator]         Downloading from https://github.com/dmikusa/tiny-health-checker/releases/download/v0.29.0/thc-aarch64-unknown-linux-musl
[INFO]     [creator]         Verifying checksum
[INFO]     [creator]         Copying from /tmp/43b40a275554b7a70487708e9159cdaf3b5f4a8d531d1c188032813523e9108a/thc-aarch64-unknown-linux-musl to /layers/paketo-buildpacks_health-checker/thc/bin
[INFO]     [creator]         The Tiny Health Checker binary is available at /layers/paketo-buildpacks_health-checker/thc/bin/thc
[INFO]     [creator]         A symlink is available at /workspace/health-check for your convenience
[INFO]     [creator]     ===> EXPORTING

You'll see that the THC was an aarch64-unknown-linux-musl. The docker image itself would run on an intel linux deploy, but thc would fail and if you tried to run manually you'd get a "File Format Error" (Which yeah, but hey, I was trying to be complete :) )

Motivations

Current cross platform build seems to be missing something in latest THC and we had container deploys that were counting on thc to report docker status because of the file format error.

Replication Note

The one complexity here is that we were doing spring-boot-maven-plugin which makes it harder for me to write a super concise "This is how you reproduce" I'm happy to supply debug output logs etc to assist in tracking this down.

dmikusa commented 1 month ago

That's a perfect amount of detail. I think I see what's happening.

  1. You're running on an M1 so it is capable of running x86 or aarch64 images.
  2. You're using the paketobuildpacks/builder-jammy-base which is only distributed in x86 format.
  3. You're using paketobuildpacks/amazon-corretto, paketobuildpacks/health-checker, and paketobuildpacks/java, which are shipped in x86 and aarch64 format.
    1. It's pulling bdb87104... image from paketobuildpacks/java, which is the x86 version
    2. You're using Amazon Corretto 8.3.0 which is pulling 83cfa97... which is older and was before we released multi-arch images, so it's only an x86 image.
    3. It's pulling a61ada... from paketobuildpacks/health-checker, which is the aarch64 version.

So it's based on the images that you're pulling, and the architecture on which the buildpack is running. If you were to pick a newer version of Amazon Corretto, it would have been shipped with multi-arch support so it would be running on aarch and the buildpack for it would be pulling the aarch64 binaries as well. When the buildpack runs, it simply looks at the currently running architecture, as reported by the Go runtime, and grabs binaries for that.

You can override this by setting BP_ARCH=amd64. We really only use this for testing, but you can try in your case as it might be enough to force the buildpack into pulling x86 binaries.

The other thing you could try would be to use the buildpack hash to identify it instead of the version. docker.io/paketobuildpacks/health-checker@sha256:a61adafdb92549b9492bd87e597df0ae3733f253637f0e3be022360f28fb7fd5. That would point to the x86 version of the image. https://hub.docker.com/layers/paketobuildpacks/health-checker/latest/images/sha256-0ec2387101f39acfd72576abd0eb22690d0e3748f5b837a8e551180f758b6027?context=explore

It's a little odd that this is happening. My expectation is that it would have seen that the builder is x86 and it would have pulled x86 for all of the other images. If this is the problem then this is not a Paketo issue, but rather the platform which in this case is the Spring Boot build tools. I would suggest you try pack cli and see if you get the same behavior. That has a different platform implementation. I believe it works off of the builder image's architecture. If does work correctly with pack, then I would suggest opening an issue with that project.

Hope that helps!

mikerimov commented 1 month ago

Ok, so as soon as I bump Coretto to the latest, it starts downloading aarch64 releases too.

[INFO]     [creator]       Corretto JDK 17.0.12: Contributing to layer
[INFO]     [creator]         Downloading from https://corretto.aws/downloads/resources/17.0.12.7.1/amazon-corretto-17.0.12.7.1-linux-aarch64.tar.gz
[INFO]     [creator]         Verifying checksum
[INFO]     [creator]         Expanding to /layers/paketo-buildpacks_amazon-corretto/jdk
[INFO]     [creator]         Adding 137 container CA certificates to JVM truststore

BP_ARCH=amd64 DOES force download to intel images.

[INFO]     [creator]       Tiny Health Checker 0.29.0: Contributing to layer
[INFO]     [creator]         Downloading from https://github.com/dmikusa/tiny-health-checker/releases/download/v0.29.0/thc-x86_64-unknown-linux-musl

So that likely means the env calling into the buildpacks (spring-boot-maven-plugin) is misconfigured.

Final question and then lets close this:

What's the correct base builder that I should be using other than builder-jammy-base?

Thanks for peeking at this.

mikerimov commented 1 month ago

So scratch that, when I deployed to launch, I get

ERROR: failed to launch: exec.d: failed to execute exec.d file at path '/layers/paketo-buildpacks_amazon-corretto/helper/exec.d/debug-9': fork/exec /layers/paketo-buildpacks_amazon-corretto/helper/exec.d/debug-9: exec format error

I went combing through the build logs to see if I could spot anything. Which made no sense to me since the logs clearly show downloading https://corretto.aws/downloads/resources/17.0.12.7.1/amazon-corretto-17.0.12.7.1-linux-x64.tar.gz

I'm guessing maybe the executable jar layer from:

[INFO]     [creator]     8 of 28 buildpacks participating
[INFO]     [creator]     paketo-buildpacks/amazon-corretto   8.5.2
[INFO]     [creator]     paketo-buildpacks/ca-certificates   3.8.4
[INFO]     [creator]     paketo-buildpacks/bellsoft-liberica 10.8.2
[INFO]     [creator]     paketo-buildpacks/syft              1.47.1
[INFO]     [creator]     paketo-buildpacks/executable-jar    6.11.0
[INFO]     [creator]     paketo-buildpacks/dist-zip          5.8.2
[INFO]     [creator]     paketo-buildpacks/spring-boot       5.31.0
[INFO]     [creator]     paketo-buildpacks/health-checker    2.2.0

Maybe is picking up the wrong thing but I feel like I'm chasing ghosts at this point. Recommendations?

dmikusa commented 1 month ago

What's the correct base builder that I should be using other than builder-jammy-base?

So we are working on having multi-arch support in all of the builders, but it's a slow process because every buildpack that ships with the builder needs to be packaged as multi-arch first.

In the meantime, what we've done is ship the paketobuildpacks/builder-jammy-buildpackless-tiny builder with multi-arch support. This is the simplest one because it's the smallest number of packages and has no buildpacks by default.

This will work just fine with Java apps because most of them will run great on tiny, it just means you need to specify the list of buildpacks that you want to use in your configuration. For a Maven app, that looks like this.

    <plugin>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                  <image>
                    <builder>paketobuildpacks/builder-jammy-buildpackless-tiny</builder>
                    <buildpacks>
                      <buildpack>paketobuildpacks/amazon-corretto</buildpack>
                      <buildpack>paketobuildpacks/java</buildpack>
                      <buildpack>paketobuildpacks/health-checker</buildpack>
                    </buildpacks>
                  </image>
                </configuration>
    </plugin>

Gradle is similar, with this.

tasks.named("bootBuildImage") {
    builder = "paketobuildpacks/builder-jammy-buildpackless-tiny"
    buildpacks = [
        "paketobuildpacks/amazon-corretto"
        "paketobuildpacks/java"
        "paketobuildpacks/health-checker"
    ]
}

We're also working on a Java-specific builder, since we've updated all of the Java-related buildpacks to support multi-arch. It's early days now, but that's located here, if you're feeling adventurous.

dmikusa commented 1 month ago

Maybe is picking up the wrong thing but I feel like I'm chasing ghosts at this point. Recommendations?

My guess is that it's still marking something as arm64/aarch64, even though the buildpack is installing an x86 JVM. Try my previous note and build using for arm64/aarch64, that should work for you.

dmikusa commented 1 month ago

Oh, I forgot. If you want to build with pack cli, there is a flag to force x86. See this thread, https://github.com/orgs/paketo-buildpacks/discussions/287#discussioncomment-9755893. That's pack specific though, so for Spring Boot Build Tools that won't work. You'd need to reach out to the Spring team and request something similar.

mikerimov commented 1 month ago

OK cool let's call this resolved. I finally figured out that while I was spelunking spring-boot-maven-plugin and finding the arch arguments for individual images that wasn't the release branch, that's upcoming. (3.4?) So until the next release I'll sit on older paketo buildpacks that aren't arch aware and call it for the day. May be back next time they update. Thank you for your assistance, and I'm sorry that it turned into a tooling bug instead.