-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Include jvmkill in Docker image #13736
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,7 +11,18 @@ | |
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
| # | ||
| FROM eclipse-temurin:17.0.4_8-jdk | ||
| FROM eclipse-temurin:17-jdk AS builder | ||
|
|
||
| RUN \ | ||
| set -xeu && \ | ||
| echo 'Acquire::Retries "3";' > /etc/apt/apt.conf.d/80-retries && \ | ||
| echo 'Acquire::http::Timeout "15";' > /etc/apt/apt.conf.d/80-timeouts && \ | ||
| apt-get update -q && \ | ||
| apt-get install -y -q git gcc make && \ | ||
| git clone https://github.com/airlift/jvmkill /tmp/jvmkill && \ | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we pin this to some commit? I expect jvmkill to rarely change but still it would prevent accidentally breaking workflows here.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. jvmkill has been stable since its initial commit in 2015, so pointing to master seems good, since the only changes are bug fixes (like adding |
||
| make -C /tmp/jvmkill | ||
|
|
||
| FROM eclipse-temurin:17-jdk | ||
|
|
||
| RUN \ | ||
| set -xeu && \ | ||
|
|
@@ -30,6 +41,7 @@ ARG TRINO_VERSION | |
| COPY trino-cli-${TRINO_VERSION}-executable.jar /usr/bin/trino | ||
| COPY --chown=trino:trino trino-server-${TRINO_VERSION} /usr/lib/trino | ||
| COPY --chown=trino:trino default/etc /etc/trino | ||
| COPY --chown=trino:trino --from=builder /tmp/jvmkill/libjvmkill.so /usr/lib/trino/bin | ||
|
|
||
| EXPOSE 8080 | ||
| USER trino:trino | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| -server | ||
| -agentpath:/usr/lib/trino/bin/libjvmkill.so | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since we compile from source I believe it would work on all 3 of x64, arm64 and ppcle64 arches?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, that’s why I did it this way. I wish there was an easier way to package this so we don’t need to build every time.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I could add a workflow in the jvmkill repo that would create releases with binaries for different architectures.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Existing is ok for me. Also serves as an example for others who want to add similar in their own docker images.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @nineinchnick I like that idea. Then we could just download them from the GitHub releases URL? |
||
| -XX:InitialRAMPercentage=80 | ||
| -XX:MaxRAMPercentage=80 | ||
| -XX:G1HeapRegionSize=32M | ||
|
|
||
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.
How much larger does this make the image? We shouldn't keep these tools beyond what's needed to build the 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.
This is a separate builder image. We just copy the (tiny) library into the final image.