docker-mendix-buildpack icon indicating copy to clipboard operation
docker-mendix-buildpack copied to clipboard

Size of image

Open jonathan-wrstbnd opened this issue 6 years ago • 6 comments

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.

jonathan-wrstbnd avatar Nov 03 '19 13:11 jonathan-wrstbnd

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....

JamesRamm avatar Apr 20 '20 08:04 JamesRamm

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?

JamesRamm avatar Apr 20 '20 08:04 JamesRamm

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 avatar Apr 20 '20 08:04 zlogic

@zlogic thanks for replying. I will make sure we upgrade and check the results

JamesRamm avatar Apr 20 '20 08:04 JamesRamm

@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.

jonathan-wrstbnd avatar Apr 20 '20 16:04 jonathan-wrstbnd

@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...

JamesRamm avatar May 04 '20 09:05 JamesRamm