-
Notifications
You must be signed in to change notification settings - Fork 11
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
Use multi-stage builds to unzip and copy jars #118
base: main
Are you sure you want to change the base?
Conversation
Delta Summary - Kotlin Code Coverage
|
9c21d00
to
39ebe00
Compare
39ebe00
to
509c849
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #118 +/- ##
============================================
+ Coverage 70.36% 70.38% +0.01%
Complexity 1040 1040
============================================
Files 282 282
Lines 11316 11314 -2
Branches 1083 1082 -1
============================================
Hits 7963 7963
+ Misses 2886 2880 -6
- Partials 467 471 +4
*This pull request uses carry forward flags. Click here to find out more. |
d472ac4
to
da905b6
Compare
coordinator/Dockerfile
Outdated
|
||
RUN case $(uname -m) in \ | ||
x86_64) \ | ||
rm -rf /libs/coordinator/lib/unpacked-blob-compressor/darwin-**; \ |
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.
Can this be moved out from the switch case here? Seems they would be removed regardless of the case, or can we use a local label to replace the the switch case to avoid repeated commands? sth like:
...
rm -rf /libs/coordinator/lib/unpacked-blob-compressor/linux-$MACHINE_TYPE/; \
...
rm -rf /libs/coordinator/lib/unpacked-blob-shnarf-calculator/linux-$MACHINE_TYPE/;
COPY --from=zip ./coordinator.zip /src | ||
|
||
RUN unzip /src/coordinator.zip -d /libs | ||
|
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.
I'd suggest to add the below line here to avoid the repeated prefix in paths:
WORKDIR /libs/coordinator/lib/
RUN apt-get update \ | ||
&& apt-get install curl -y \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* \ |
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.
I dun think we even need these apt-get
related commands here, right?
This PR implements issue(s) #
Multi stage reduces size of image by 110MB.
Removes unnecessary libs depending on architecture.
Checklist