Open srbala opened 3 years ago
Looking see this issue implemented. Is outside contribution allowed?
@srbala Adopt is a open source project, there is no outside or inside :) You are absolutely welcome to contribute !
@dinogun @karianna I am looking into work on fix. Here in my analysis prior to start the work.
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.include
folder and other text files like 3RDPARTY/legal can save another 1MB, can they be included in remove list?
- 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 removingbinutils
. @dinogun @karianna, your input on multi-stage build?
@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.
- 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.
@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.
There are few more files/folder to consider to remove from JDK/JRE Builds. This drops additional 50MB+
I am not sure
/opt/java/openjdk/lib/ct.sym
can be added to the list.