Skip to content

Commit

Permalink
Add Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
williamlui00 committed Sep 2, 2024
1 parent d657c1c commit e560071
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#
# Build stage
#

FROM maven:3.8.4-openjdk-8 AS build

WORKDIR /app

COPY pom.xml .
COPY src ./src

RUN mvn clean package -DskipTests

#
# Final stage
#

FROM openjdk:8-jre-alpine

EXPOSE 8080

COPY --from=build /app/target/java-maven-app-1.1.0-SNAPSHOT.jar /usr/app/

WORKDIR /usr/app

ENTRYPOINT ["java", "-jar", "java-maven-app-1.1.0-SNAPSHOT.jar"]

0 comments on commit e560071

Please sign in to comment.