0

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 -

  1. What are these files?
  2. Why is my build not able to create them under my project diretory (as is the default)?
  3. Why don't I see any discussion on these files anywhere?
  4. Is there another way to avoid this error?
Do Will
  • 711
  • 1
  • 9
  • 18
  • You are on Windows, right? Is `` literally what you see in the log? (If so, no wonder that it will fail.) But I assume you just replaced the actual file path prefix with the string `` to hide your personal directory structure, right? Is there anything particular about the full path, e.g., whitespace, non-ascii character? Is it an absolute path? Does it have a drive letter (e.g., C:\)? – Chanseok Oh Jan 11 '22 at 22:33
  • Yes. I am on WIndows. As you assumed, I replaced the actuall full ptath with to hide my directory structure. Now that you mentioned it, my path may be the issue. It is rather long with some white spaces - "E:\Git\Java Projects\Web Applications\hubitat". Let me try by removing the white spaces. Thank you very much – Do Will Jan 12 '22 at 21:37
  • Try to find the minimum path that works by trail-and-error. If you think this is a bug, please file an issue on the Jib repo. – Chanseok Oh Jan 14 '22 at 16:36

0 Answers0