You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
jre_minimal package does not strip jlink result file. It should strip libjvm.so by default to save disk space.
If I run strip -p --strip-unneeded ./lib/server/libjvm.so, the size goes down to 17.5MB from 232.6MB.
To Reproduce
Steps to reproduce the behavior:
Create some derivation that uses jre_minimal. jre_minimal will create libjvm.so using jlink, though it doesn't strip the binary at all.
{jre,stdenv}:
stdenv.mkDerivation{# other configs...installPhase='' # other scripts... wrapProgram "$out/bin/my-app" \ --set JAVA_HOME "${jre.home}" '';}
Describe the bug
jre_minimal package does not strip jlink result file. It should strip
libjvm.so
by default to save disk space.If I run
strip -p --strip-unneeded ./lib/server/libjvm.so
, the size goes down to 17.5MB from 232.6MB.To Reproduce
Steps to reproduce the behavior:
Create some derivation that uses jre_minimal. jre_minimal will create libjvm.so using jlink, though it doesn't strip the binary at all.
Expected behavior
jre_minimal strip the binary by default to make
libjvm.so
smaller.Additional context
Related GitHub issue: docker-library/openjdk#217
Related NixOS discourse discussion: https://discourse.nixos.org/t/how-to-create-a-docker-image-with-minimal-jdk-11-there-is-no-jre11-headless/11849/8
I don't know how strip works. What's the difference between
--strip-unneeded
and--strip-debug
? Which one is better in this case?Notify maintainers
@raboof
@roberth
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.The text was updated successfully, but these errors were encountered: