Files
Ankur MhatreandClaude Sonnet 5.5 bb12eaca0a Add jib: Spring Boot 4.2.0 images with Jib 3.5.2 vs Buildpacks
Same app built both ways: layers, reproducible digest, extraDirectories, registry push
without a daemon, wrong-JRE and missing-compile failures, Buildpacks memory calculator at
512 MB. Captured output in jib/output, regenerated by jib/scripts/run-all.sh.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017ic4b6ZEVHGaYy15HAxRzy
2026-12-01 08:32:09 +05:30

23 lines
1.3 KiB
Bash
Executable File

#!/usr/bin/env bash
# The same app through spring-boot:build-image (Cloud Native Buildpacks).
# Needs -Pcorp-proxy in the sandbox where the post was written, because the builder container has to
# reach github.com through a TLS-intercepting proxy. On an open network drop the PROFILE line.
source "$(dirname "$0")/lib.sh"
LOG=/tmp/bp-build.log
START=$(date +%s)
"${MVN[@]}" spring-boot:build-image -Dspring-boot.build-image.cleanCache=true "${BP_ARGS[@]}" >"$LOG" 2>&1 || { tail -30 "$LOG"; exit 1; }
END=$(date +%s)
{
banner "mvn spring-boot:build-image (cold build: cleanCache=true; key lines of the build log)"
grep -E 'Building image|Using builder|\[creator\] +(Paketo Buildpack for (BellSoft|Spring Boot|Executable|CA|Syft|Java|Apache)|BellSoft Liberica JRE [0-9.]+: |Using Java version|Downloading from)|Adding layer|Successfully built|BUILD|Total time' "$LOG" | sed -E 's/^\[INFO\] +\[creator\] +/ /' | grep -v 'Finished at'
banner "Image config"
docker image inspect jib-demo:buildpacks --format 'tags={{.RepoTags}}
user={{.Config.User}}
created={{.Created}}
entrypoint={{json .Config.Entrypoint}}
layers={{len .RootFS.Layers}}
size={{.Size}} bytes'
banner "Wall time of this build (seconds, indicative)"
echo "$((END-START))"
} 2>&1 | clean | tee "$OUT/06-buildpacks.txt"