Skip to content
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

[improve][build] Use eclipse-temurin:17 image instead of apt installation #23335

Closed
wants to merge 1 commit into from

Conversation

nodece
Copy link
Member

@nodece nodece commented Sep 23, 2024

Motivation

Reduce the docker image size by https://adoptium.net/zh-CN/blog/2021/08/using-jlink-in-dockerfiles/

apachepulsar/pulsar 3.0.7-SNAPSHOT-new e35b177e267a 623MB
apachepulsar/pulsar 3.0.7-SNAPSHOT-old fd1e1113514d 943MB

It was reduced by 320MB.

We already improved the 4.0.0: #22973

Modifications

  • Use eclipse-temurin:17 image instead of apt installation.

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Sep 23, 2024
@nodece nodece self-assigned this Sep 23, 2024
@nodece
Copy link
Member Author

nodece commented Sep 23, 2024

/pulsarbot rerun-failure-checks

@lhotari
Copy link
Member

lhotari commented Sep 23, 2024

Reduce the docker image size.

Please provide more context in the description.
How much does this actually reduce the size?

Copy link
Member

@lhotari lhotari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We shouldn't change the LTS version if there isn't a very strong reason to do so.

Copy link
Member

@lhotari lhotari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking this PR until there's clarification of the necessity of this change.

@nodece
Copy link
Member Author

nodece commented Sep 23, 2024

We shouldn't change the LTS version if there isn't a very strong reason to do so.

@lhotari I have updated the PR description, and significantly reducing the image size would be beneficial for version 3.0.

@nodece nodece requested a review from lhotari September 23, 2024 09:41
@nodece
Copy link
Member Author

nodece commented Sep 23, 2024

/pulsarbot rerun-failure-checks

@lhotari
Copy link
Member

lhotari commented Sep 23, 2024

We shouldn't change the LTS version if there isn't a very strong reason to do so.

@lhotari I have updated the PR description, and significantly reducing the image size would be beneficial for version 3.0.

@nodece There's a high risk that this is a breaking change for many users. If this change is made, there needs to be a PIP. I'll close this PR that it doesn't get accidentially merged without an explicit decision.

@lhotari lhotari closed this Sep 23, 2024
@lhotari
Copy link
Member

lhotari commented Sep 23, 2024

One possible reason why there's such a large difference is caused by the fact that command apt-get -y install temurin-17-jdk doesn't include --no-install-recommends. A lot of optional packages get installed.
However we cannot change this for a LTS version without a PIP.

@nodece nodece deleted the reduce-jdk-size branch September 23, 2024 10:25
@nodece
Copy link
Member Author

nodece commented Sep 25, 2024

Package: temurin-17-jdk
Version: 17.0.6.0.0+10
Architecture: amd64
Maintainer: Eclipse Adoptium Package Maintainers <[email protected]>
Installed-Size: 321706
Depends: adoptium-ca-certificates, java-common, libasound2, libc6, libx11-6, libfontconfig1, libfreetype6, libxext6, libxi6, libxrender1, libxtst6, zlib1g
Recommends: fonts-dejavu-core, fonts-dejavu-extra
Provides: java-compiler, java-runtime, java-runtime-headless, java-sdk, java-sdk-headless, java10-runtime, java10-runtime-headless, java10-sdk, java10-sdk-headless, java11-runtime, java11-runtime-headless, java11-sdk, java11-sdk-headless, java12-runtime, java12-runtime-headless, java12-sdk, java12-sdk-headless, java13-runtime, java13-runtime-headless, java13-sdk, java13-sdk-headless, java14-runtime, java14-runtime-headless, java14-sdk, java14-sdk-headless, java15-runtime, java15-runtime-headless, java15-sdk, java15-sdk-headless, java16-runtime, java16-runtime-headless, java16-sdk, java16-sdk-headless, java17-runtime, java17-runtime-headless, java17-sdk, java17-sdk-headless, java2-runtime, java2-runtime-headless, java2-sdk, java2-sdk-headless, java5-runtime, java5-runtime-headless, java5-sdk, java5-sdk-headless, java6-runtime, java6-runtime-headless, java6-sdk, java6-sdk-headless, java7-runtime, java7-runtime-headless, java7-sdk, java7-sdk-headless, java8-runtime, java8-runtime-headless, java8-sdk, java8-sdk-headless, java9-runtime, java9-runtime-headless, java9-sdk, java9-sdk-headless
Section: java
Priority: optional
Description: Eclipse Temurin 17 JDK
 Eclipse Temurin JDK is an OpenJDK-based development environment to create
 applications and components using the programming language Java.
Filename: pool/main/t/temurin-17/temurin-17-jdk_17.0.6.0.0+10_amd64.deb
SHA1: 6fc4f3339da47dd474edc5a2cb10c362fe4e1c60
SHA256: 9e958aa6009514764ec7120117b2dd85350fb706635433743d7fe8dac6578a55
Size: 164880620

fonts-dejavu-core and fonts-dejavu-extra looks unnecessary.

Our private version has already merged this feature, and once there are no issues during testing, I will create a PIP to improve this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc-not-needed Your PR changes do not impact docs ready-to-test release/3.0.7
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants