Skip to content

fix: remove apt curl install from runtime image#97

Merged
tlarbals824 merged 1 commit intodevelopfrom
fix/use-busybox-healthcheck
May 5, 2026
Merged

fix: remove apt curl install from runtime image#97
tlarbals824 merged 1 commit intodevelopfrom
fix/use-busybox-healthcheck

Conversation

@tlarbals824
Copy link
Copy Markdown
Collaborator

문제

Docker 이미지 빌드 중 런타임 스테이지에서 curl 하나를 설치하기 위해 apt-get update && apt-get install을 수행하고 있었습니다.

RUN apt-get update && apt-get install -y --no-install-recommends curl

GitHub Actions 환경에서 Ubuntu apt mirror 응답이 느려지면 이 단계가 수 분 이상 지연되어 전체 배포가 늦어질 수 있습니다.

수정 내용

런타임 이미지를 Alpine 기반 Temurin JRE로 변경하고, healthcheck는 Alpine/BusyBox에 기본 포함된 wget을 사용하도록 바꿨습니다.

FROM eclipse-temurin:25-jre-alpine

HEALTHCHECK ... \
  CMD wget -q -O /dev/null http://127.0.0.1:8081/actuator/health/readiness || exit 1

기대 효과

  • 런타임 스테이지에서 apt-get update/install 제거
  • curl 설치를 위한 외부 패키지 다운로드 병목 제거
  • 이미지 빌드 시간과 네트워크 실패 가능성 감소
  • healthcheck 동작은 readiness endpoint 확인으로 유지

검증

  • docker manifest inspect eclipse-temurin:25-jre-alpine
  • git diff --check

참고

전체 Docker build는 로컬에서 수행하지 않았습니다. CI에서 실제 이미지 빌드까지 확인하면 됩니다.

Switch the runtime stage to the Alpine Temurin JRE so the healthcheck can use BusyBox wget already present in the image. This removes apt package downloads from Docker builds.\n\nConstraint: GitHub Actions image builds were spending minutes in apt-get installing curl for healthchecks.\nRejected: Keep Ubuntu Temurin and install curl | preserves the slow apt network path.\nConfidence: high\nScope-risk: narrow\nDirective: Keep container healthchecks dependency-free from apt packages.\nTested: docker manifest inspect eclipse-temurin:25-jre-alpine; git diff --check\nNot-tested: Full docker build
@github-actions github-actions Bot added the bug label May 5, 2026
@tlarbals824 tlarbals824 merged commit 62bf0d7 into develop May 5, 2026
2 checks passed
@github-actions github-actions Bot deleted the fix/use-busybox-healthcheck branch May 5, 2026 07:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant