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

Additional files to remove from Slim JDK/JRE builds #478

Open
srbala opened this issue Nov 30, 2020 · 7 comments
Open

Additional files to remove from Slim JDK/JRE builds #478

srbala opened this issue Nov 30, 2020 · 7 comments
Assignees
Milestone

Comments

@srbala
Copy link
Contributor

srbala commented Nov 30, 2020

There are few more files/folder to consider to remove from JDK/JRE Builds. This drops additional 50MB+

/opt/java/openjdk/src.zip 
/opt/java/openjdk/demo --for hotspots
/opt/java/openjdk/include 
/opt/java/openjdk/man 
/opt/java/openjdk/sample 

I am not sure /opt/java/openjdk/lib/ct.sym can be added to the list.

@srbala
Copy link
Contributor Author

srbala commented Apr 19, 2021

Looking see this issue implemented. Is outside contribution allowed?

@dinogun
Copy link
Collaborator

dinogun commented Apr 19, 2021

@srbala Adopt is a open source project, there is no outside or inside :) You are absolutely welcome to contribute !

@srbala
Copy link
Contributor Author

srbala commented Apr 29, 2021

@dinogun @karianna
I am looking into work on fix. Here in my analysis prior to start the work.

  • Existing slim-java script contains the step to remove src.zip file, but script is not executed/called for centos, clefos, ubi, ubi-minimal etc
  • It is possible to save 12-15MB more if multi stage build step is used, where binutils package can be skipped. Please note multi-stage build gives better results compare to removing binutils. In fact some of the os ubi for example has negative impact, slight increase in size on remove packages.
  • Remove include folder and other text files like 3RDPARTY/legal can save another 1MB, can they be included in remove list?

@srbala
Copy link
Contributor Author

srbala commented May 1, 2021

  • It is possible to save 12-15MB more if multi stage build step is used, where binutils package can be skipped. Please note multi-stage build gives better results compare to removing binutils.
    @dinogun @karianna, your input on multi-stage build?

@karianna
Copy link
Member

karianna commented May 5, 2021

  • I think src can go as you suggest for slim
  • I'm not 100% binutils is safe to remove.
  • Legal would need to remain.

@srbala
Copy link
Contributor Author

srbala commented May 6, 2021

@karianna

  • I think src can go as you suggest for slim

alpine-slim and ubuntu-slim scripts already removes src.zip, my PR will help to remove for other OSs.

  • I'm not 100% binutils is safe to remove.

Existing alpine-slim and ubuntu-slim scripts install bintools prior to run slim-java script and removes it after script complete.
image

  • Legal would need to remain.

Since bintools only added for slim image and the package removed after it, it was never in the container image. bintools is not a legal issue. But, It might be for removing the 3rd-party files and text, attributes to size of 1MB.

@karianna karianna added this to the May 2021 milestone May 17, 2021
@srbala
Copy link
Contributor Author

srbala commented May 26, 2021

@dinogun I have noticed Jenkins script using docker plugin command. Is multi stage build is allowed in the verion of docker on the build server. is the docker version 19.x and above or podman 2.x and above?

Using multi stage build in Dockerfile? It can save another 13-15MB space.

@karianna karianna modified the milestones: May 2021, June 2021 Jun 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants