Build stage
FROM maven:3.8.2-openjdk-17 AS build
COPY . .
RUN mvn clean package -DskipTests
Package stage
FROM openjdk:17-jdk-slim
WORKDIR /app
COPY --from=build /target/bot-0.0.1-SNAPSHOT.jar /app.jar
ENTRYPOINT [“java”, “-jar”, “/app.jar”]
Deploying my Springboot Discord bot and I keep on getting Deploy failed - Timed out. Above is my dockerfile. I tried to add an environment variable PORT: 10000, 8080, etc. I even tried to add this: "ENV PORT=8080 EXPOSE=8080 on my Dockerfile. Same problem. While it’s deploying the Discord bot works but it stops once I get that Timed out error.