- Notifications
You must be signed in to change notification settings - Fork 41.6k
Closed
Description
The spring-boot:build-image
Maven goal and bootBuildImage
Gradle task configure the CNB builder to cache layers created by buildpacks to make subsequent image builds run faster. Currently the cache is stored as named volume in the Docker daemon. This doesn't work well when running builds on BitBucket, as discussed in buildpacks/pack#1077 (comment).
To better support running builds in BitBucket pipelines the Boot plugins could be enhanced to support storing the build and launch caches in bind mounts.
For Maven, the build configuration would be:
<project> <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration> <image> <buildCache> <bind> <source>./build-cache-dir</source> </bind> </buildCache> <launchCache> <bind> <source>./launch-cache-dir</source> </bind> </launchCache> </image> </configuration> </plugin> </plugins> </build> </project>
For Gradle, the build configuration would be:
bootBuildImage { buildCache { bind { source = "./build-cache-dir" } } launchCache { bind { source = "./launch-cache-dir" } } }
andrej-urvantsev, ToppScorer, carlosjustino, kubacech, FIAV1 and 3 more
Metadata
Metadata
Assignees
Labels
type: enhancementA general enhancementA general enhancement