-
Notifications
You must be signed in to change notification settings - Fork 0
Update: Add docker unrelated components #112
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
2 warnings found (use docker --debug to expand): - LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 14) - LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 18)
May raise an error
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.
Pull Request Overview
This PR optimizes the Docker build process to reduce image size by leveraging Next.js standalone mode and improving the .dockerignore configuration. The main goal is to reduce machine resource usage by significantly decreasing the Docker image size from ~660MB to ~160MB.
Key Changes
- Implemented Next.js standalone build configuration to eliminate node_modules dependency in the final image
- Enhanced .dockerignore with comprehensive exclusions to reduce build context size
- Modified Dockerfile to use
node server.jsinstead ofnpm run startfor more efficient container startup
Reviewed Changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| Dockerfile | Updated to use Next.js standalone output, removed node_modules copy, and switched to direct Node.js execution |
| .dockerignore | Expanded with comprehensive file exclusions including development tools, logs, and build artifacts |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
de20c59 to
b79f8a8
Compare
이미지 용량 줄여서 머신 덜 아프게 해주기
기존
이미지 크기 660 MB
─────────────────────────────────────────────
총 크기: ~660 MB
action 소요 시간: 대략 3분
개선 후
이미지 크기 160 MB
─────────────────────────────────────────────
총 크기: ~160 MB
action 소요 시간: 2분 40초. 대략 20~30초 정도 절약
로컬에서는 230MB인데 ec2 머신 ARM64에서는 이미지 사이즈가 더 작아짐 굳
정리