build: Dockerfile + .dockerignore (컨테이너 배포용)
CI / build (push) Failing after 13m26s

멀티스테이지(JDK 빌드→JRE 런타임), bootJar -x test 로 실행가능 jar 하나 생성.
프로파일/포트는 런타임 env(SPRING_PROFILES_ACTIVE)로 결정 → dev/prod 이미지 공용.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
sb
2026-07-11 16:27:16 +09:00
parent ca14f8ee64
commit b124e60c88
2 changed files with 24 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
FROM eclipse-temurin:17-jdk-alpine AS builder
WORKDIR /app
COPY gradlew .
COPY gradle gradle
COPY build.gradle .
COPY settings.gradle .
COPY src src
RUN chmod +x gradlew && ./gradlew bootJar -x test
FROM eclipse-temurin:17-jre-alpine
WORKDIR /app
COPY --from=builder /app/build/libs/*.jar app.jar
ENTRYPOINT ["java", "-jar", "app.jar"]