Using Spring boot and gradle to build docker image for deploy on my K8s infrasctructure. I would like to switch from Paketo's Liberica OpenJDK distro to Adoptium's OpenJDK on the docker image. When I make the changes indicated on Paketo's site, the app builds and publishes to my repo just fine, but I still see the Liberica jdk being dropped on and used on the resultant image.
Using Spring boot 2.6.4 with all relevant dependencies at the same revision level. Using gradle 7.4.
Here is my gradle config for the bootBuildImage stanza:
bootBuildImage {
imageName = "${dockerUrl}/${project.name}:${version}"
publish = true
docker {
tlsVerify = false
publishRegistry {
username = "${dockerUsername}"
password = "${dockerPassword}"
url = "${dockerUrl}"
email = "${dockerEmail}"
}
}
environment = [
'BPE_DELIM_JAVA_TOOL_OPTIONS' : ' ',
'BPE_APPEND_JAVA_TOOL_OPTIONS' : '-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:8787',
'BPE_APPEND_JAVA_TOOL_OPTIONS' : '-Duser.timezone=America/New_York'
]
buildpacks = ["gcr.io/paketo-buildpacks/adoptium", "urn:cnb:builder:paketo-buildpacks/java"]
}
Solved: The buildpacks values are correct in my original post. I was having an issue with my jenkins build system deploying old images so continued to see liberica jdk on those. Verified today with proper image that only the adoptium jdk layer is being written to the image and the liberica layer is not there. Upvoted responses indicating this.