-
Notifications
You must be signed in to change notification settings - Fork 0
feat:dockerfile에 arm명시 #128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Warning Rate limit exceeded@youcastle03 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 2 minutes and 53 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (2)
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. ✨ Finishing touches
🧪 Generate unit tests
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. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary of Changes
Hello @youcastle03, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
이 Pull Request는 Dockerfile에 ARM64 아키텍처를 명시적으로 지정함으로써, ARM 기반 시스템에서의 빌드 호환성과 안정성을 향상시키는 것을 목표로 합니다. 이는 다양한 환경에서 애플리케이션이 올바르게 동작하도록 보장하는 중요한 변경사항입니다.
Highlights
- Dockerfile 아키텍처 명시: Dockerfile 내의 모든
FROM명령어에--platform=linux/arm64옵션을 추가하여 빌드 시 ARM64 아키텍처를 명시적으로 지정했습니다.
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.
| Feature | Command | Description |
|---|---|---|
| Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
| Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
| Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
| Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
안녕하세요. PR을 검토했습니다. Dockerfile에 arm64 플랫폼을 명시하도록 수정하셨네요. 이 변경은 특정 배포 환경을 대상으로 할 때는 유효하지만, 다른 아키텍처(예: x86_64) 환경에서의 빌드 성능 저하를 유발할 수 있습니다.
이를 해결하기 위해 Docker의 빌드 인자를 사용하여 플랫폼을 동적으로 설정하는 방법을 제안했습니다. 이렇게 하면 Dockerfile의 유연성과 이식성이 향상되어 다양한 환경에서 효율적으로 이미지를 빌드하고 실행할 수 있습니다. 자세한 내용은 코드 리뷰 코멘트를 확인해주세요.
docker/Dockerfile
Outdated
| FROM --platform=linux/arm64 openjdk:21-jdk as builder | ||
| WORKDIR /workspace/app | ||
|
|
||
| # JAR 파일을 레이어별로 추출 | ||
| COPY build/libs/*SNAPSHOT.jar app.jar | ||
| RUN java -Djarmode=layertools -jar app.jar extract | ||
|
|
||
| FROM openjdk:21-jdk | ||
| FROM --platform=linux/arm64 openjdk:21-jdk |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
플랫폼을 linux/arm64로 하드코딩하면 x86_64 (amd64) 아키텍처에서 Docker 이미지를 빌드하거나 실행할 때 에뮬레이션으로 인해 성능이 크게 저하될 수 있습니다.
Dockerfile을 여러 아키텍처에서 유연하게 사용할 수 있도록 ARG를 사용하여 플랫폼을 동적으로 설정하는 것을 권장합니다. Docker는 빌드 시 TARGETPLATFORM이라는 특별한 ARG를 자동으로 제공하여 이를 쉽게 처리할 수 있습니다.
다음과 같이 수정하면 빌드 환경에 맞는 최적의 이미지를 생성할 수 있습니다. ${TARGETPLATFORM:-linux/amd64} 구문은 TARGETPLATFORM 인자가 없을 경우 기본값으로 linux/amd64를 사용하도록 합니다.
ARG TARGETPLATFORM
FROM --platform=${TARGETPLATFORM:-linux/amd64} openjdk:21-jdk as builder
WORKDIR /workspace/app
# JAR 파일을 레이어별로 추출
COPY build/libs/*SNAPSHOT.jar app.jar
RUN java -Djarmode=layertools -jar app.jar extract
FROM --platform=${TARGETPLATFORM:-linux/amd64} openjdk:21-jdk
#️⃣연관된 이슈
#123
📝 작업 내용
📢 참고 사항
X