Skip to content

Commit

Permalink
Feat : java 애플리케이션 도커 컨테이너 실행 Dockerfile 추가 (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
chanmin-00 committed Jan 16, 2025
1 parent bc0f023 commit 9daeec5
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# 도커 이미지 지정
FROM openjdk:17-jdk-slim

# build/libs/ 에 있는 jar 파일을 JAR_FILE 변수에 저장
ARG JAR_FILE=build/libs/*.jar

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

# Docker 컨테이너가 시작될 때 /app.jar 실행
# 애플리케이션 timezone을 대한민국으로 설정
ENTRYPOINT ["java","-jar","-Duser.timezone=Asia/Seoul","/app.jar"]

0 comments on commit 9daeec5

Please sign in to comment.