Reputation: 1562
I'm trying to build an ARM image on an amd64 node.
This documentation about buildpacks states that I can do it using heroku/builder:24
as the builder image and passing the platform as a parameter --platform linux/arm64
I'm using bootBuildImage gradle task to build my image. I learned how to specify a builder image like:
bootBuildImage {
archiveFile = war.archiveFile
if (System.getenv('CI')) {
builder = "heroku/builder:24"
//...
But I couldn't find any way to pass the platform
. Isn't this impossible using the gradle task? Should I revert to building my images using Dockerfiles or using buildpack commands directly?
Upvotes: 0
Views: 182
Reputation: 5053
The future release of Spring Boot, 3.4.0, will provide you with the option to choose the target platform
bootBuildImage {
imagePlatform = "linux/arm64"
[etc]
Like @Daniel Mikusa suggested in the comments, you will need a host that can provide an ARM 64 capability; such as Mac Silicons or probably Linux hosts with arm64 emulation enabled and configured in the Docker Daemon
Upvotes: 4