Skip to content

Commit

Permalink
Merge pull request #11 from TravelMate-KU/feat/docker
Browse files Browse the repository at this point in the history
feat: create Docker file
  • Loading branch information
jaeuk520 authored Feb 21, 2024
2 parents 7683ef0 + 4f0211a commit a2a6bbd
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM openjdk:17-jdk

# build가 되는 시점에 JAR_FILE이라는 변수 명에 build/libs/*.jar 선언
# build/libs - gradle로 빌드했을 때 jar 파일이 생성되는 경로
ARG JAR_FILE=build/libs/*.jar

# JAR_FILE을 app.jar로 복사
COPY ${JAR_FILE} app.jar

# 운영 및 개발에서 사용되는 환경 설정을 분리
ENTRYPOINT ["java", "-jar", "-Dspring.profiles.active=prod", "/app.jar"]

0 comments on commit a2a6bbd

Please sign in to comment.