We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f7a8292 commit 2e52865Copy full SHA for 2e52865
Dockerfile
@@ -1,15 +1,17 @@
1
-FROM bellsoft/liberica-openjdk-alpine:17 AS build
2
-WORKDIR /app
3
-COPY . .
4
-
5
-RUN apk add --no-cache bash
6
-RUN chmod +x gradlew && ./gradlew --version && ./gradlew clean build -x test --stacktrace
7
+# 1. 베이스 이미지 설정
8
FROM bellsoft/liberica-openjdk-alpine:17
+
+# 2. 작업 디렉토리 설정
9
WORKDIR /app
10
-COPY --from=build /app/build/libs/api-0.0.1-SNAPSHOT.jar app.jar
11
+# 3. GitHub Actions에서 이미 빌드되어 넘어온 jar 파일을 복사
+# 현재 폴더에 있는 api-0.0.1-SNAPSHOT.jar를 컨테이너 안의 app.jar로 복사
+COPY api-0.0.1-SNAPSHOT.jar app.jar
+# 4. 볼륨 및 포트 설정
12
VOLUME /tmp
13
VOLUME /logs
14
EXPOSE 8080
15
16
+# 5. 실행 명령
17
ENTRYPOINT ["java", "-Dspring.profiles.active=prod", "-jar", "app.jar"]
0 commit comments