I am trying to deploy a Spring boot application to Google Cloud Run. I have prepared following docker file
# Stage 1: compile a JAR file
FROM maven:3-openjdk-17 as builder
# Copy local code to the container image.
WORKDIR /app
COPY . .
# Build a release artifact.
RUN mvn package -DskipTests
# Stage 2: run the previously built JAR file
FROM amazoncorretto:17
COPY --from=builder /app/target/*.jar app.jar
# Run the web service on container startup.
ENTRYPOINT ["java","-jar","/app.jar"]
But while building the container it gives the following error:
2024-04-28 14:42:28.824 EET
Step 6/7 : COPY –from=builder /app/target/*.jar app.jar
“Build”: COPY failed: no source files were specified
however container builds and runs in my local environment without an issue. What am I missing?