Skip to content

Commit

Permalink
add dockerfile for spring boot
Browse files Browse the repository at this point in the history
  • Loading branch information
FelixTJDietrich committed Aug 1, 2024
1 parent 1111df3 commit 87c2a73
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions server/application-server/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Stage 1: Build the JAR file
FROM maven:3.9.7-amazoncorretto-21 AS build
WORKDIR /app
COPY pom.xml .
COPY src ./src
RUN mvn clean package -DskipTests

# Stage 2: Run the application
FROM amazoncorretto:21-alpine
VOLUME /tmp
EXPOSE 8080
COPY --from=build /app/target/*.jar app.jar
ENTRYPOINT ["java", "-jar", "/app.jar"]

0 comments on commit 87c2a73

Please sign in to comment.