I have a SpringBoot(2.6.2)/Gradle(7.3.3) application. I am using Jib(3.1.4) to create the docker image. After the image is created and pushed to the registry (successfully), my build would fail with this error -
java.nio.file.NoSuchFileException: <Project-Dir>\build\jib-image.digest
After much trial-and-error and some help from this documentation, I figured out how to make the error go away. What was needed on my build.gradle was this -
jib {
outputPaths.digest = "${buildDir}/jib-image.digest"
outputPaths.imageId = "${buildDir}/jib-image.id"
outputPaths.imageJson = "${buildDir}/jib-image.json"
}
This forces these files to be created in the specified directories.
My questions are -
- What are these files?
- Why is my build not able to create them under my project diretory (as is the default)?
- Why don't I see any discussion on these files anywhere?
- Is there another way to avoid this error?