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

Add fonts (& infrastructure) to Alpine images #221

Closed
wants to merge 1 commit into from

Conversation

TobiX
Copy link

@TobiX TobiX commented Oct 29, 2024

Issue #, if available: #112 & #108

Description of changes:

Instead of creating a new "headless" variant of the Alpine images, this just adds font-droid to all the Alpine images. This pulls in fontconfig & freetype, which allows Java/AWT to render fonts (see #108 for details). This only adds about 6MB to each image, which I find reasonable.

I selected Droid, since it is a bit smaller then other fonts, under a simple license (Apache 2.0) and has a reasonable selection of alternatives (Serif, Sans-Serif, Mono)

Size comparison For reference, here is a list of images with different fonts included:
localhost/corretto-8-jre-dejavu      latest        8a58b4581222  17 minutes ago  133 MB
localhost/corretto-8-jre-freefont    latest        85d045e180db  17 minutes ago  129 MB
localhost/corretto-8-jre-noto        latest        d09ff1c4dc7b  17 minutes ago  135 MB
localhost/corretto-8-jre-droid       latest        bd1d14675e33  17 minutes ago  123 MB
localhost/corretto-8-jre-opensans    latest        f0a3f149c4e7  17 minutes ago  125 MB
localhost/corretto-8-jre-liberation  latest        f8aa030f28f4  17 minutes ago  126 MB
docker.io/library/amazoncorretto     8-alpine-jre  e79af4bd4f9e  13 days ago     116 MB

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Copy link

@JArtur79 JArtur79 left a comment

Choose a reason for hiding this comment

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

Useful pack which should be there

@Rudometov
Copy link
Contributor

Thank you for this pr. While we understand this would solve many issues for customers who do use fonts, it would also increase image size for all customers even for those who don't need fonts. Alpine image is a way to go for the smallest image possible usecases.

We plan to update our readme to include instructions on installing fonts for the various images since this does come up regularly.

@Rudometov Rudometov closed this Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants