Skip to content

Commit c703b8a

Browse files
committed
[infra] Dockerfile ์ˆ˜์ •
1 parent c016d50 commit c703b8a

2 files changed

Lines changed: 15 additions & 30 deletions

File tree

โ€Ž.idea/workspace.xmlโ€Ž

Lines changed: 10 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

โ€ŽDockerfileโ€Ž

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,11 @@
1-
# 1. ๋นŒ๋“œ ๋‹จ๊ณ„
2-
FROM maven:3.9.3-eclipse-temurin-17 AS build
3-
WORKDIR /app
4-
5-
# Maven pom.xml ๋จผ์ € ๋ณต์‚ฌ ํ›„ ์˜์กด์„ฑ ๋‹ค์šด๋กœ๋“œ
6-
COPY demo/pom.xml .
7-
RUN mvn dependency:go-offline -B
8-
9-
# ์†Œ์Šค ๋ณต์‚ฌ
10-
COPY demo/src ./src
11-
12-
# JAR ๋นŒ๋“œ
13-
RUN mvn clean package -DskipTests
14-
15-
# 2. ์‹คํ–‰ ๋‹จ๊ณ„
1+
# ์‹คํ–‰ ๋‹จ๊ณ„๋งŒ ์‚ฌ์šฉ
162
FROM eclipse-temurin:17-jdk-focal
173
WORKDIR /app
184

19-
# ๋นŒ๋“œ๋œ JAR๋งŒ ๋ณต์‚ฌ
20-
COPY --from=build /app/target/demo-0.0.1-SNAPSHOT.jar app.jar
5+
# ์ด๋ฏธ ๋นŒ๋“œ๋œ JAR ๋ณต์‚ฌ
6+
COPY demo-0.0.1-SNAPSHOT.jar app.jar
217

228
EXPOSE 8080
9+
10+
# ์ปจํ…Œ์ด๋„ˆ ์‹œ์ž‘ ์‹œ JAR ์‹คํ–‰
2311
ENTRYPOINT ["java", "-jar", "app.jar"]

0 commit comments

Comments
ย (0)