We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 619f6c5 commit ad2d043Copy full SHA for ad2d043
Dockerfile
@@ -8,16 +8,14 @@ WORKDIR /app
8
COPY build.gradle.kts .
9
COPY settings.gradle.kts .
10
11
+# 종속성 설치
12
RUN gradle dependencies --no-daemon
13
14
# 소스코드 복사
15
COPY src src
16
-# .env 복사
17
-COPY .env .env
18
-
19
# 애플리케이션 빌드
20
-RUN gradle build --no-daemon
+RUN gradle build --no-daemon -x test
21
22
# 두 번째 스테이지 : 실행 스테이지
23
FROM container-registry.oracle.com/graalvm/jdk:21
@@ -26,7 +24,9 @@ WORKDIR /app
26
24
27
25
# 첫 번째 스테이지에서 빌드된 JAR 파일 복사
28
COPY --from=builder /app/build/libs/*.jar app.jar
29
-COPY --from=builder /app/.env .env
+
+# 빌드 컨텍스트의 .env(backend-cd 작업에서 빌드된 .env)를 컨테이너 안으로 복사
+COPY .env .env
30
31
# 실행할 JAR 파일 지정
32
ENTRYPOINT ["java", "-Dspring.profiles.active=prod", "-jar", "app.jar"]
0 commit comments