Skip to content

Commit

Permalink
Create Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
royroyee authored Sep 17, 2023
1 parent 7f4f2f2 commit aa94553
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Build stage
FROM gradle:8.2.1-jdk17 AS builder
WORKDIR /workspace

# Copy all necessary files
COPY . .

# Build the project
RUN gradle build

# Runtime stage
FROM openjdk:17-jdk-slim
WORKDIR /app

ARG JAR_PATH=/workspace/build/libs
ARG JAR_FILE_NAME=bibum_server-0.0.1-SNAPSHOT.jar

COPY --from=builder ${JAR_PATH}/${JAR_FILE_NAME} app.jar
ENTRYPOINT ["sh", "-c", "java ${JAVA_OPTS} -jar /app/app.jar"]

0 comments on commit aa94553

Please sign in to comment.