build(docker-dev): Windows 바인드마운트에서 gradlew 실행 보장
Build & Deploy to K8s / build-and-deploy (push) Successful in 4m6s
Build & Deploy to K8s / build-and-deploy (push) Successful in 4m6s
- backend-spring.Dockerfile: CMD에 sh ./gradlew 명시 호출 — 호스트가 Windows일 때 바인드마운트가 빌드 시점 chmod +x를 덮어쓰면서 ./gradlew가 실행 비트 없이 매핑되는 문제 해결. Linux/Mac 환경에도 동일하게 동작. - .gitattributes 신규: gradlew와 *.sh 를 eol=lf 로 고정해 Windows core.autocrlf=true 환경에서 CRLF 변환으로 컨테이너 내 sh 파싱이 깨지는 문제 재발 방지. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,4 @@
|
|||||||
|
# Force LF for shell scripts and Gradle wrapper so they work in Linux containers
|
||||||
|
# regardless of host autocrlf settings.
|
||||||
|
*.sh text eol=lf
|
||||||
|
gradlew text eol=lf
|
||||||
@@ -24,4 +24,4 @@ EXPOSE 8081
|
|||||||
# 백그라운드: `./gradlew classes -t` 가 .java 변경 감지해 .class 재컴파일
|
# 백그라운드: `./gradlew classes -t` 가 .java 변경 감지해 .class 재컴파일
|
||||||
# 포그라운드: `./gradlew bootRun` 이 앱 실행, DevTools 가 build/classes 변경 감지해 자동 리로드
|
# 포그라운드: `./gradlew bootRun` 이 앱 실행, DevTools 가 build/classes 변경 감지해 자동 리로드
|
||||||
# 주의: --continuous 는 gradle daemon 필요 → --no-daemon 제거
|
# 주의: --continuous 는 gradle daemon 필요 → --no-daemon 제거
|
||||||
CMD ["sh", "-c", "./gradlew classes -t & exec ./gradlew bootRun"]
|
CMD ["sh", "-c", "sh ./gradlew classes -t & exec sh ./gradlew bootRun"]
|
||||||
|
|||||||
Reference in New Issue
Block a user