Build fails spring boot docker

Hi, I’m trying to deploy my spring boot aplication on render but it fails. It builds and runs locally, but when i try to deploy it it fails.

This is the log:

Nov 27 03:43:14 PM > [2/2] COPY ./target/demo-0.0.1-SNAPSHOT.jar app.jar:
Nov 27 03:43:14 PM ------
Nov 27 03:43:14 PM Dockerfile:2
Nov 27 03:43:14 PM --------------------
Nov 27 03:43:14 PM 1 | FROM openjdk:18-jdk-oracle
Nov 27 03:43:14 PM 2 | >>> COPY “./target/demo-0.0.1-SNAPSHOT.jar” “app.jar”
Nov 27 03:43:14 PM 3 | EXPOSE 8080
Nov 27 03:43:14 PM 4 | ENTRYPOINT [“java”, “-jar”, “app.jar”]
Nov 27 03:43:14 PM --------------------
Nov 27 03:43:14 PM error: failed to solve: failed to compute cache key: failed to calculate checksum of ref 8krm7i4jsm492yk4ry0vtjt2l::7newn3lc6zt6ztd435wnnvd0t: failed to walk /home/user/.local/tmp/buildkit-mount351492444/target: lstat /home/user/.local/tmp/buildkit-mount351492444/target: no such file or directory

Hi there,

Thanks for reaching out.

I think that error means there may be an issue with the COPY command finding the expected paths. Do you use the Buildkit engine when building locally? That’s what we use when building your Dockerfile on Render docs

Alan

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.