The build-image goal builds a container image directly from a Spring Boot application through the Spring Boot Maven plugin. Spring Boot 2.3.0 and later can do this without extra dependencies, configuration files, or project changes. section 18.3
Build and run an image
Run ./mvnw spring-boot:build-image with Docker installed. The goal creates a default image tag from the project artifactId and version, such as library/tacocloud:0.0.19-SNAPSHOT. Start it with docker run -p8080:8080 library/tacocloud:0.0.19-SNAPSHOT. section 18.3
$ mvnw spring-boot:build-image \
-Dspring-boot.build-image.imageName=tacocloud/tacocloud:0.0.19-SNAPSHOT
Use a custom image name when the image must reference an organization’s registry repository instead of the default library prefix. section 18.3
