23 lines
502 B
Docker
23 lines
502 B
Docker
# 개발용 Spring Boot 백엔드 Dockerfile
|
|
FROM eclipse-temurin:21-jdk-alpine
|
|
|
|
WORKDIR /app
|
|
|
|
# curl 설치 (헬스체크용)
|
|
RUN apk add --no-cache curl
|
|
|
|
# Gradle Wrapper 복사 및 의존성 캐싱
|
|
COPY gradlew ./
|
|
COPY gradle ./gradle
|
|
RUN chmod +x gradlew
|
|
|
|
COPY build.gradle settings.gradle ./
|
|
RUN ./gradlew dependencies --no-daemon || true
|
|
|
|
# 소스 코드는 볼륨 마운트로 처리
|
|
|
|
EXPOSE 8081
|
|
|
|
# 개발 서버 시작 (spring-boot-devtools 활용)
|
|
CMD ["./gradlew", "bootRun", "--no-daemon"]
|