Unable to create docker image using mvnw

Since 2 days I am trying to build a docker image using maven wrapper command :

./mvnw spring-boot:build-image “-Dspring-boot.build-image.imageName=/”

Can’t I use this command now? Isn’t it available?
The o/p is :

[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 04:50 min
[INFO] Finished at: 2024-10-26T13:24:43+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:3.3.3:build-image (default-cli) on project Jobs: Execution default-cli of goal org.springframework.boot:spring-boot-maven-plugin:3.3.3:build-image failed: Builder lifecycle ‘creator’ failed with status code 51 → [Help 1]

The target spring:boot:build-image uses Cloud Native Buildpacks to create oci images - and not Dockerfiles and buildkit to build the oci image (as in: It doesn’t use Docker to build the image).

This topic looks like it should be posted in a spring boot forum.

2 Likes