I’m trying to deploy a Java Spring backend application on Render.com, but I’m encountering an issue during the deployment process. Whenever I attempt to deploy, I receive the following error message: “Exited with status 1 while building your code.”
Here’s the Dockerfile I’m using for the deployment:
FROM maven:3.8.3-openjdk-17 AS build
COPY . .
RUN mvn clean package -DskipTests
FROM openjdk:17.0.1-jdk-slim
COPY --from=build /target/demo-0.0.1-SNAPSHOT.jar demo.jar
EXPOSE 8080
ENTRYPOINT ["java", "-jar", "demo.jar"]
I’ve ensured that the Maven build completes successfully on my local machine, and the generated JAR file (demo-0.0.1-SNAPSHOT.jar) exists in the /target directory.
Could anyone help me identify the cause of this issue? I’m relatively new to Docker and deployment processes, so any guidance would be greatly appreciated.
my github repo link => https://github.com/JadhavC07/Java-MySQL-Server