Skip to content

Commit

Permalink
Fix: Dockerfile 원상복구
Browse files Browse the repository at this point in the history
  • Loading branch information
deveunhwa committed Nov 5, 2024
1 parent 15235a6 commit 1789b81
Showing 1 changed file with 5 additions and 14 deletions.
19 changes: 5 additions & 14 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
# Use an official Gradle image to build the backend
# Use OpenJDK 17 image
FROM openjdk:17

# Set working directory
WORKDIR /app

# Copy and build the application
COPY . .
RUN gradle build -x test

# Use a lightweight JRE image for runtime
FROM openjdk:11-jre-slim
COPY --from=build /app/build/libs/*.jar /app/app.jar

EXPOSE 8080
CMD ["java", "-jar", "-Dspring.profiles.active=prod", "/app.jar"]
# Copy the built jar file
COPY build/libs/*.jar app.jar

# Set the entry point to run the application
ENTRYPOINT ["java", "-jar", "-Dspring.profiles.active=prod", "/app.jar"]

0 comments on commit 1789b81

Please sign in to comment.