-
Notifications
You must be signed in to change notification settings - Fork 24
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
|
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.32% 70.21% -0.11%
+ Complexity 1081 1080 -1
============================================
Files 304 304
Lines 12413 12413
Branches 1179 1179
============================================
- Hits 8729 8716 -13
- Misses 3190 3200 +10
- Partials 494 497 +3
*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/;
coordinator/Dockerfile
Outdated
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?
a63e658
to
1939569
Compare
b2ef74c
to
c6d5449
Compare
7efc0c9
to
bf1b194
Compare
30df9bd
to
eb11af2
Compare
@@ -1,20 +1,38 @@ | |||
FROM openjdk:22-ea-17-slim-bookworm | |||
# BUILDER image | |||
FROM eclipse-temurin:21-jdk-noble AS builder |
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.
@jonesho IIRC from our last our meeting with @julien-marchand we agreed on not having a builder image because the step commands bellow in RUN
can be executed in the host machine.?
What is the motivation and value of having a builder image?
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.
@jpnovais Yes, but as mentioned above, the jar
command was not available in JRE image, and hence we need to use JDK image here to use the jar
command to extract and recreate the JAR archive based on the machine type (from uname -m
). I was thinking about moving this "extract and recreate JAR" step to pipeline job but then we'd need separate "extract + build" jobs for arm64
and amd64
image respectively, which would take up more pipeline resources and runtime imo, and complicate the build process. Welcome for any better approach :)
This PR implements issue(s) #134
Multi stage reduces size of image by 110MB.
Removes unnecessary libs depending on architecture.
Checklist