Skip to content

Commit

Permalink
devops : docker file add
Browse files Browse the repository at this point in the history
ν”„λ‘œμ νŠΈ 도컀 싀행을 μœ„ν•΄μ„œ 도컀 파일 μΆ”κ°€ν•©λ‹ˆλ‹€.
  • Loading branch information
HABINOH committed Apr 24, 2024
1 parent faac37a commit 9f1d7b0
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions backEnd/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# open jdk 21 λ²„μ „μ˜ ν™˜κ²½μ„ ꡬ성
FROM openjdk:21-alpine

# tzdata νŒ¨ν‚€μ§€ μ„€μΉ˜ 및 νƒ€μž„μ‘΄ μ„€μ •
RUN apk add --no-cache tzdata \
&& cp /usr/share/zoneinfo/Asia/Seoul /etc/localtime \
&& echo "Asia/Seoul" > /etc/timezone \
&& apk del tzdata

# buildκ°€ λ˜λŠ” μ‹œμ μ— JAR_FILEμ΄λΌλŠ” λ³€μˆ˜ λͺ…에 build/libs/*.jar μ„ μ–Έ
# build/libs - gradle둜 λΉŒλ“œν–ˆμ„ λ•Œ jar 파일이 μƒμ„±λ˜λŠ” 경둜
ARG JAR_FILE=build/libs/ulvan-0.0.1-SNAPSHOT.jar

# JAR_FILE을 agaproject.jar둜 볡사
COPY ${JAR_FILE} ulvan.jar

# 운영 및 κ°œλ°œμ—μ„œ μ‚¬μš©λ˜λŠ” ν™˜κ²½ 섀정을 뢄리
# -Duser.timezone=Asia/Seoul JVM μ˜΅μ…˜μ„ μ‚¬μš©ν•˜μ—¬ μ• ν”Œλ¦¬μΌ€μ΄μ…˜ μˆ˜μ€€μ—μ„œλ„ νƒ€μž„μ‘΄μ„ μ„€μ •
ENTRYPOINT ["java", "-jar", "-Dspring.profiles.active=dev", "-Duser.timezone=Asia/Seoul", "/finfarm.jar"]

0 comments on commit 9f1d7b0

Please sign in to comment.