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

Assess current set of dependencies in dockerfiles to determine if they are still needed #458

Closed
gdams opened this issue Oct 30, 2023 · 8 comments · Fixed by #460
Closed
Assignees

Comments

@gdams
Copy link
Member

gdams commented Oct 30, 2023

Initially discussed with @sxa via slack.

We don't believe that we need to ship libretls & zlib with Alpine anymore (we bundle zlib with the JDK)

All remaining dependencies should also be checked

@gdams
Copy link
Member Author

gdams commented Oct 30, 2023

Alpine

Name Still Required? Comments
bash gdams - bash was required for #415
fontconfig 👍 See Footnote1
ttf-dejavu 👍 See Footnote1
java-cacerts gdams - replace with more granular ca-certificates p11-kit-trust
libretls not required
zlib bundled with the JDK
musl-locales
musl-locales-lang
binutils 👍 Required for jlink, see docker-library/openjdk#351
tzdata 👍 Require for TZ, see see AdoptOpenJDK/openjdk-docker#249

fontconfig

[1]:# java.lang.UnsatisfiedLinkError: /usr/local/openjdk-11/lib/libfontmanager.so: libfreetype.so.6: cannot open shared object file: No such file or directory
# java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11FontManager
# https://github.com/docker-library/openjdk/pull/235#issuecomment-424466077

@gdams
Copy link
Member Author

gdams commented Oct 30, 2023

Centos

Name Still Required? Comments
gzip 👍 Required to extract the JDK
tar 👍 Required to extract the JDK
curl 🔜 Required for historical reasons, see #255, will be removed in 22
wget 👍 Required to download JDK
tzdata 👍 Require for TZ, see see AdoptOpenJDK/openjdk-docker#249
openssl
ca-certificates 👍 Utilities for syncing Centos & OpenJDK CA certs, #293
binutils 👍 Required for jlink, see docker-library/openjdk#351
fontconfig 👍 See Footnote1

fontconfig

[1]:# java.lang.UnsatisfiedLinkError: /usr/local/openjdk-11/lib/libfontmanager.so: libfreetype.so.6: cannot open shared object file: No such file or directory
# java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11FontManager
# https://github.com/docker-library/openjdk/pull/235#issuecomment-424466077

@gdams
Copy link
Member Author

gdams commented Oct 30, 2023

UBI9-Minimal

Name Still Required? Comments
gzip 👍 Required to extract the JDK
tar 👍 Required to extract the JDK
binutils 👍 Required for jlink, see docker-library/openjdk#351
tzdata 👍 Require for TZ, see see AdoptOpenJDK/openjdk-docker#249
openssl
wget 👍 Required to download JDK
ca-certificates 👍 Utilities for syncing UBI & OpenJDK CA certs, #293
fontconfig 👍 See Footnote1
glibc-langpack-en 👍 fixes: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)

fontconfig

[1]:# java.lang.UnsatisfiedLinkError: /usr/local/openjdk-11/lib/libfontmanager.so: libfreetype.so.6: cannot open shared object file: No such file or directory
# java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11FontManager
# https://github.com/docker-library/openjdk/pull/235#issuecomment-424466077

@gdams
Copy link
Member Author

gdams commented Oct 30, 2023

Ubuntu (Focal and Jammy)

Name Still Required? Comments
curl 🔜 Required for historical reasons, see #255, will be removed in 22
wget 👍 Required to download JDK
fontconfig 👍 See Footnote1
ca-certificates 👍 Utilities for syncing Ubuntu & OpenJDK CA certs, #293
p11-kit 👍 Utilities for syncing Ubuntu & OpenJDK CA certs, #293
binutils 👍 Required for jlink, see docker-library/openjdk#351
tzdata 👍 Require for TZ, see see AdoptOpenJDK/openjdk-docker#249
locales
libatomic1 👍 Required for arm32 builds

fontconfig

[1]:# java.lang.UnsatisfiedLinkError: /usr/local/openjdk-11/lib/libfontmanager.so: libfreetype.so.6: cannot open shared object file: No such file or directory
# java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11FontManager
# https://github.com/docker-library/openjdk/pull/235#issuecomment-424466077

@gdams gdams assigned gdams and sxa Oct 30, 2023
@sxa
Copy link
Member

sxa commented Oct 30, 2023

Ref Alpine, I suspect we can get rid of the requirement for bash without too much difficulty if it's only needed for entrypoint.sh - that's not a particularly complex script.

@smlambert smlambert changed the title Asses current set of dependencies in dockerfiles to determine if they are still needed Assess current set of dependencies in dockerfiles to determine if they are still needed Nov 6, 2023
@gdams
Copy link
Member Author

gdams commented Nov 7, 2023

Ref Alpine, I suspect we can get rid of the requirement for bash without too much difficulty if it's only needed for entrypoint.sh - that's not a particularly complex script.

@yosifkit did some digging and discovered that it broke in busybox for a while but has since been fixed:

$ docker run --rm -it -e test.var=alpine busybox:1.25.0 /bin/sh -c 'env' | grep 'test.var'
test.var=alpine
$ docker run --rm -it -e test.var=alpine busybox:1.26.0 /bin/sh -c 'env' | grep 'test.var'
$ docker run --rm -it -e test.var=alpine busybox:1.27.0 /bin/sh -c 'env' | grep 'test.var'
$ docker run --rm -it -e test.var=alpine busybox:1.28.0 /bin/sh -c 'env' | grep 'test.var'
test.var=alpine

@gdams
Copy link
Member Author

gdams commented Nov 7, 2023

ping @dinogun as he might have some context as to why we ship UBI and Centos with the OpenSSL package

@gdams gdams closed this as completed in #460 Nov 9, 2023
@dinogun
Copy link

dinogun commented Nov 10, 2023

@gdams The best explanation that I have is that we required OpenSSL at one point for OpenJ9 and this ended up being copied over for OpenJDK as well. Would be reasonable to remove it. Folks who really want OpenSSL, can always update their Dockerfiles to add it on top of the standard images.

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 a pull request may close this issue.

3 participants