Running Java Spring Boot in Docker container on Web Services


I am trying to run a Java SpringBoot application (Rest API) on Render with Web Services and Docker, The service needs to be public accessible that is why I am using Web Services. But when I try to deploy it to Render the deployment keeps failing


# Build stage
FROM maven:3.6.0-jdk-11-slim AS build
COPY src /home/app/src
COPY pom.xml /home/app
RUN mvn -f /home/app/pom.xml clean package

# Package stage
FROM openjdk:11-jre-slim
COPY --from=build /home/app/target/Falcon-0.0.1.jar /usr/local/lib/falcon.jar
ENTRYPOINT ["java","-jar","/usr/local/lib/falcon.jar"]

Failed Deployment Log

I am using as address the server listens to and I tried 80, 443 & 8000 as ports, I don’t know what I’m doing wrong.

Hi Jesper,

I’m having some trouble locating this service under this email, can you give me the name so I can take a look?

Fixed this by adding a ‘PORT’ env variable with the port number. Instance now showing up as ‘Deploy succeeded’