-
Notifications
You must be signed in to change notification settings - Fork 30
Chore: optimize Dockerfile #692
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
base: develop
Are you sure you want to change the base?
Conversation
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 Dockerfiles by switching from Debian/Ubuntu-based images to Alpine-based images and replacing apt-get
with apk add
to reduce overall image sizes.
- Updated base images for Node, Go, Nginx, and Alpine runtime to their Alpine variants.
- Replaced
apt-get
commands withapk add --no-cache
across all Dockerfiles. - Reduced final image size by ~33%.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
dev/Dockerfile-demo-wallet | Switched node:18 → node:18-alpine , nginx:1.17 → nginx:1.17-alpine , replaced apt-get with apk . |
Dockerfile.development | Switched builder & development stages to golang:1.24.2-alpine , replaced apt-get with apk . |
Dockerfile | Switched builder to golang:1.24.2-alpine , runtime to alpine:3.19 , replaced apt-get with apk . |
Comments suppressed due to low confidence (2)
Dockerfile:9
- [nitpick] Use
COPY . ./
instead ofADD
when no extraction or remote URL fetch is needed; it’s more explicit and avoids unintended behaviors.
ADD . ./
Dockerfile.development:5
- The comment mentions Delve but the stage does not install it. If remote debugging with Delve is required, add
apk add --no-cache delve
; otherwise update the comment to reflect the actual tools being installed.
# Stage 2: Setup the development environment with Delve for debugging
stellar-disbursement-platform-backend-preview is available here: |
Something went wrong with PR preview build please check |
Something went wrong with PR preview build please check |
stellar-disbursement-platform-backend-preview is available here: |
stellar-disbursement-platform-backend-preview is available here: |
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
26508f8
to
fd18d52
Compare
stellar-disbursement-platform-backend-preview is available here: |
What
Optimize Dockerfile, making images smaller by 33% 85.55MB -> 59.17MB
Why
📈 Kaizen
Checklist
SDP-1234: Add new feature
orChore: Refactor package xyz
format. The Jira ticket code was included if available.CHANGELOG.md
is updated (if applicable)