You have to do all this in the same RUN command, chaining with & to avoid adding layers where you won't remove size by removing files from previous layer. jar files are already compressed, the tar.gz is just there to "package" them. tar.gz file which is roughly the same size as the resulting directory as. One thing you should do in your dockerfile while installing oracle jdk is to remove the downloaded. The Oracle JDK License has changed for releases starting April 16, 2019. It has everything the JRE has, but also the compiler (javac) and tools (like javadoc and jdb). You can without problem remove missoncontrol on a server, I assume you can get rid of visualvm also, you'll have to check if you need something in this lib directory, but I can't tell without knowing your app. The JDK is the Java Development Kit, the full-featured SDK for Java. There's two *src.zip which can be removed, they won't be of use, and as you can see the lib directory is half the size and within it you have a bunch of things you don't really need: /usr/lib/jvm/jdk1.8.0_101$ du -hs lib/* By "lazyness" due to the complexity to list every needed dependency no one strip down to the necessary libraries only, but that is the way to go if you wish to reduce the installed size to strict minimum.Ī more usable way could be strip off some of the installed things which are taking a lot of space: /usr/lib/jvm/jdk1.8.0_101$ du -hs * JDK is the acronym of Java Development Kit, JRE is the one for Java Runtime Engine. Java Debug Wire Protocol (JDWP) Documentation Comment Specification for the Standard Doclet. As docker is not an operating system, no there's no JDK for docker.Īs I understand your question, it's that a full JDK is too large for your wishes, in this case you may try switching to just the JRE and include only necessary libraries. Java Native Interface (JNI) JVM Tool Interface (JVM TI) Serialization.
0 Comments
Leave a Reply. |