Size of image
Hi, we are using this tool extensively in our projects. The bloated size of the images are really becoming an issue for us. I've put in a ticket with support about this issue but thought I should put an Issue in here as well. Image that this tool builds that should be less than 100MB are coming out over 1.3GB.
This is becoming a huge issue for us. Our image is pushing 2.8GB, about 4x bigger than the next largest image in our stack. The /opt/mendix folder in our image is at 690MB and the rootfs image (the parent image) docker lists at being 223MB. Together, it is almost 1GB which while not great is still much smaller than 2.8GB so I am wondering where the remaining 1.8GB is coming from....
431MB comes from the Java distribution in a hidden folder (this forms part of the 690MB of the mendix folder though)
du -sh .local/usr/lib/jvm/* 310M .local/usr/lib/jvm/AdoptOpenJDK-jdk-11.0.3-AdoptOpenJDK-x64 121M .local/usr/lib/jvm/AdoptOpenJDK-jre-11.0.3-AdoptOpenJDK-x64
Is the JDK necessary to run Mendix apps?
Hello @JamesRamm, are you using the v2.4.0 version of the Buildpack?
This version includes optimizations such as using multistage builds, deleting the JDK after the build completes and making the base layers reusable across images.
@zlogic thanks for replying. I will make sure we upgrade and check the results
@JamesRamm we moved to 2.4.0 a month back or so and our image sizes were cut in half. I still feel like they are too large but we'll settle for this for the time being.
@zlogic Early tests shows an image size of ~560MB now, which is much better than ~2.5GB thanks. I think there is still room for improvement (e.g. #89 ) but this is OK for us for now...