meuse icon indicating copy to clipboard operation
meuse copied to clipboard

can't not copy file from build stage

Open Sherlock-Holo opened this issue 3 years ago • 1 comments

run docker build -t meuse .

it will fail on

Step 8/13 : COPY --from=build-env /app/target/uberjar/meuse-*-standalone.jar /app/meuse.jar COPY failed: no source files were specified

Sherlock-Holo avatar Sep 08 '22 07:09 Sherlock-Holo

Hello,

It works on my computer :s

mcorbin avatar Sep 08 '22 08:09 mcorbin

I can reproduce this issue on my machine. Looks like the output folder from build-env isn't as expected:

Created /app/target/default+uberjar/meuse-1.3.0.jar
Created /app/target/default+uberjar/meuse-1.3.0-standalone.jar

Versus the expected:

Step 8/13 : COPY --from=build-env /app/target/uberjar/meuse-*-standalone.jar /app/meuse.jar
COPY failed: no source files were specified

RoastVeg avatar Sep 22 '22 15:09 RoastVeg

Also ran into this.

A fix is to call lein uberjar in the Dockerfile without the default profile.

RUN lein with-profile :uberjar uberjar

Or just fix up the COPY command to copy from default+uberjar, although idk how stable this is, since I don't know anymore than one can quickly google about the clojure/lein build process.

dkales avatar Oct 04 '22 08:10 dkales

I modified the COPY path in the image, it should be good now.

mcorbin avatar Oct 04 '22 16:10 mcorbin