Skip to content

Docker 적용#147

Merged
gyunnybot merged 5 commits into
mainfrom
chore/146
Apr 17, 2026
Merged

Docker 적용#147
gyunnybot merged 5 commits into
mainfrom
chore/146

Conversation

@gyunnybot

Copy link
Copy Markdown
Collaborator

관련 이슈 번호

이 PR을 통해 해결하려는 문제가 무엇인가요?

서버 환경 변경 시에도 안정적으로 애플리케이션을 실행하기 위해 Docker를 적용합니다

이 PR에서 핵심적으로 변경된 사항은 무엇일까요?

  • Dockerfile 추가
  • .dockerignore 추가

핵심 변경 사항 외에 추가적으로 변경된 부분이 있나요?

  • 빌드 시 plain jar 생성 비활성화

Reviewer 분들이 이런 부분을 신경써서 봐 주시면 좋겠어요

@gyunnybot gyunnybot self-assigned this Apr 16, 2026
@coderabbitai

coderabbitai Bot commented Apr 16, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: pr-ism/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 2e51db98-07ae-424a-9218-7d3097ab7016

📥 Commits

Reviewing files that changed from the base of the PR and between 3e1e399 and 07a6d78.

📒 Files selected for processing (1)
  • Dockerfile
✅ Files skipped from review due to trivial changes (1)
  • Dockerfile

📝 Walkthrough

Walkthrough

이 PR은 Docker 기반 배포 준비를 추가합니다. .dockerignore로 불필요한 빌드·개발 산출물을 Docker 빌드 컨텍스트에서 제외하고, 멀티스테이지 Dockerfile을 통해 Amazon Corretto 21 기반의 빌드 및 경량 런타임 이미지를 구성합니다. 런타임 이미지는 non-root appuser로 실행되며 Pinpoint 에이전트 및 여러 시스템 속성을 환경변수로 주입하는 엔트리포인트를 정의합니다. build.gradle에서는 기본 jar 태스크를 비활성화하여 Docker 빌드 시 Spring Boot의 bootJar 사용을 의도합니다.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목 '동 적용'은 변경사항(Docker, .dockerignore, build.gradle 수정)과 직접적으로 관련되어 있으며, 핵심 목표를 명확하게 전달합니다.
Description check ✅ Passed PR 설명은 이슈 #146 종료, Docker 적용의 목적, 핵심 변경사항(Dockerfile, .dockerignore 추가, plain JAR 비활성화) 등 변경사항과 관련된 정보를 포함하고 있습니다.
Linked Issues check ✅ Passed PR은 이슈 #146(Docker 적용)의 요구사항을 충족합니다. Dockerfile, .dockerignore 추가, build.gradle 수정을 통해 Docker를 적용하여 서버 환경 변경 시 안정적인 애플리케이션 실행을 목표로 합니다.
Out of Scope Changes check ✅ Passed 모든 변경사항(Dockerfile, .dockerignore, build.gradle 수정)이 이슈 #146의 Docker 적용이라는 범위 내에 있으며, 관련 없는 변경은 발견되지 않았습니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/146

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gyunnybot gyunnybot changed the title Chore/146 Docker 적용 Apr 16, 2026
@gyunnybot gyunnybot added the chore 환경 설정 관련 작업 시 label Apr 16, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.dockerignore:
- Around line 16-21: 현재 .dockerignore의 규칙(docs/, *.md, !README.md 등)만으로는
src/main/resources/static/docs 하위의 생성 문서가 도커 빌드 컨텍스트에 포함되어 이미지에 들어갈 수 있습니다;
.dockerignore에 명시적으로 src/main/resources/static/docs/ 혹은 **/static/docs/ 같은 패턴을
추가해 생성 산출물 경로를 제외하고, 기존 예외(!README.md)와 충돌하지 않도록 확인하세요(참조: 현재 파일의 docs/, *.md,
!README.md 규칙 및 빌드 스크립트의 -x copyApiDocument 동작을 함께 고려).

In `@Dockerfile`:
- Around line 27-39: The Dockerfile forces injection of the Pinpoint Java agent
in the ENTRYPOINT using PINPOINT_AGENT_PATH and PINPOINT_AGENT_VERSION, which
will fail if those envs or the jar are absent; change this to be conditional:
add ARG/ENV defaults for PINPOINT_AGENT_PATH and PINPOINT_AGENT_VERSION (empty)
and modify the ENTRYPOINT to check for non-empty PINPOINT_AGENT_PATH and
PINPOINT_AGENT_VERSION and the existence of the agent jar before appending the
-javaagent option (or move the logic into a small startup shell script invoked
by ENTRYPOINT that builds JAVA_AGENT_OPTS only when
${PINPOINT_AGENT_PATH}/pinpoint-bootstrap-${PINPOINT_AGENT_VERSION}.jar exists),
so the container starts normally when Pinpoint vars are unset.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: pr-ism/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 93f779ad-5ab0-4d1e-a806-fb26b1dd9dfa

📥 Commits

Reviewing files that changed from the base of the PR and between 54bab92 and 3e1e399.

📒 Files selected for processing (3)
  • .dockerignore
  • Dockerfile
  • build.gradle

Comment thread .dockerignore
Comment on lines +16 to +21
docs/
*.md
!README.md
.github
.env
.env.local

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

생성 문서 경로를 Docker 컨텍스트에서 제외해 빌드 재현성을 높여주세요.

현재 규칙만으로는 src/main/resources/static/docs가 포함될 수 있습니다. Line 11의 -x copyApiDocument와 결합되면 로컬 잔여 산출물이 이미지에 들어갈 여지가 있습니다.

제안 diff
 .env
 .env.local
+src/main/resources/static/docs/

관련 개념: Docker build context 최소화/재현 가능한 빌드(Reproducible Build) 가이드도 함께 참고해 주세요.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
docs/
*.md
!README.md
.github
.env
.env.local
docs/
*.md
!README.md
.github
.env
.env.local
src/main/resources/static/docs/
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.dockerignore around lines 16 - 21, 현재 .dockerignore의 규칙(docs/, *.md,
!README.md 등)만으로는 src/main/resources/static/docs 하위의 생성 문서가 도커 빌드 컨텍스트에 포함되어
이미지에 들어갈 수 있습니다; .dockerignore에 명시적으로 src/main/resources/static/docs/ 혹은
**/static/docs/ 같은 패턴을 추가해 생성 산출물 경로를 제외하고, 기존 예외(!README.md)와 충돌하지 않도록
확인하세요(참조: 현재 파일의 docs/, *.md, !README.md 규칙 및 빌드 스크립트의 -x copyApiDocument 동작을 함께
고려).

Comment thread Dockerfile
@gyunnybot gyunnybot requested review from HyNS00 and apptie April 16, 2026 11:11

@apptie apptie left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨습니다
간단한 수정사항이 있어 RC 드렸습니다

Comment thread Dockerfile Outdated
ENTRYPOINT ["sh", "-c", "\
if [ -n \"${PINPOINT_AGENT_PATH}\" ] && [ -f \"${PINPOINT_AGENT_PATH}/pinpoint-bootstrap-${PINPOINT_AGENT_VERSION}.jar\" ]; then \
exec java \
-javaagent:${PINPOINT_AGENT_PATH}/pinpoint-bootstrap-${PINPOINT_AGENT_VERSION}.jar \

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

필수

현재 pinpoint apm을 활용해 느리게 실행되는 api나 쿼리를 측정하는 것이 중요한 상황입니다
특히 우리 서비스가 통계 서비스라 자칫하면 쿼리가 과하게 느리게 실행될 수 있습니다
그래서 지금처럼 if문 분기를 통해 pinpoint가 없으면 그냥 일반적인 자바 실행보다는
pinpoint가 없으면 실패하는 것이 자연스러워 보입니다

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수정하겠습니다.

Comment thread Dockerfile Outdated
COPY src ./src
RUN ./gradlew clean bootJar -x test -x copyApiDocument --no-daemon

FROM amazoncorretto:21-headless

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

필수

amazoncorretto:21-al2023-headless

이걸로 바꿔야되네요
슬랙 봇 쪽도 해당 이미지로 변경하도록 하겠습니다

@gyunnybot gyunnybot requested a review from apptie April 16, 2026 11:49

@apptie apptie left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨습니다

@HyNS00 HyNS00 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨습니다.

@gyunnybot gyunnybot merged commit eb589da into main Apr 17, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore 환경 설정 관련 작업 시

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docker 적용

3 participants