deployment failing
nareshreddy11
FREEOP

2 months ago

ERROR: failed to build: failed to solve: failed to compute cache key: failed to calculate checksum of ref vpxe4o583wzkeholbyvhiqk05::t1gxi1b2vkkecep5bjm84rdth: "/app/target": not found

Load more

$10 Bounty

2 Replies

mohsinkhadim59
HOBBY

2 months ago

That error just means Docker can't find the directory /app/target when it tries to copy it. It's 99% likely an issue with your path in a multi-stage build.

Check your COPY --from=builder (or similar) line. You are telling it to look in /app/target, but the previous stage probably didn't put the files there.

Did you set WORKDIR /app in the previous stage? If not, your build artifacts might just be at /target or /usr/src/app/target and secondly : Did the build actually finish and create the target folder?

To debug this quickly, add this line right before the one that crashes to see where the files actually ended up in your logs:

Dockerfile run the command below

RUN ls -laR /

looking at Dockerfile would have been much easier to point out the fix


aldrinm
HOBBY

2 months ago

Are you using railpack or docker ? I had a similar issue with railpack and had to change the location of the build folder in my scripts, just so that it would match the railpack one. I couldn't find a way to configure the locations that railpack was referring to


Loading...