Comments on: Slim Docker Images for Java https://piotrminkowski.com/2023/11/07/slim-docker-images-for-java/ Java, Spring, Kotlin, microservices, Kubernetes, containers Fri, 05 Apr 2024 08:01:46 +0000 hourly 1 https://wordpress.org/?v=6.9.1 By: stef13 https://piotrminkowski.com/2023/11/07/slim-docker-images-for-java/#comment-2384 Fri, 05 Apr 2024 08:01:46 +0000 https://piotrminkowski.com/?p=14643#comment-2384 Really cool article ! thanks !!
Would be interesting to compare that size with other “trendy” lang. (such as Go, Python for instance)

]]>
By: piotr.minkowski https://piotrminkowski.com/2023/11/07/slim-docker-images-for-java/#comment-2253 Mon, 15 Jan 2024 12:07:49 +0000 https://piotrminkowski.com/?p=14643#comment-2253 In reply to Sergey.

Hi. I choose the best available option when it comes to the image size for my tests. I was also trying base images with JRE.

]]>
By: piotr.minkowski https://piotrminkowski.com/2023/11/07/slim-docker-images-for-java/#comment-2252 Mon, 15 Jan 2024 12:02:51 +0000 https://piotrminkowski.com/?p=14643#comment-2252 In reply to Tim Ellison.

Thanks for that info. I can help with the tests. You can let me know once you have release ready.

]]>
By: Sergey https://piotrminkowski.com/2023/11/07/slim-docker-images-for-java/#comment-2209 Mon, 27 Nov 2023 10:07:46 +0000 https://piotrminkowski.com/?p=14643#comment-2209 Hi, nice article !
jlink is a nice tool indeed. There is something that is questioning me though. I could not help but notice the image tag is ‘jdk-21’.
In my exp using plain JRE instead of JDK is a huge improvement in terms of space by itself. Consulting Bellsoft’s page for containers confirms that theory, the JRE image is already 71mb (ref -> https://bell-sw.com/libericajdk-containers)…

]]>
By: Clayton Walker https://piotrminkowski.com/2023/11/07/slim-docker-images-for-java/#comment-2197 Fri, 10 Nov 2023 03:16:19 +0000 https://piotrminkowski.com/?p=14643#comment-2197 In reply to piotr.minkowski.

If you’re looking for images from the upstream distroless project, you can use `gcr.io/distroless/java21-debian12`. These images are built on top of temurin images.

Alternatively, you can use distroless and build your own image on top with `gcr.io/distroless/java-base-debian12`.

]]>
By: piotr.minkowski https://piotrminkowski.com/2023/11/07/slim-docker-images-for-java/#comment-2194 Wed, 08 Nov 2023 20:50:48 +0000 https://piotrminkowski.com/?p=14643#comment-2194 In reply to Clayton Walker.

I was using distroless images (with java 11 and jib) some time ago. But what is the current most popular distroless with Java 21?

]]>
By: Tim Ellison https://piotrminkowski.com/2023/11/07/slim-docker-images-for-java/#comment-2193 Wed, 08 Nov 2023 18:15:00 +0000 https://piotrminkowski.com/?p=14643#comment-2193 Great article Piotr, and good to see the details of your work.

At Adoptium we are always looking for ways to keep the Temurin Alpine containers as tight as possible, and it looks like there are a couple of packages we can remove from the current image to slim down a bit further. Details of the analysis are here https://github.com/adoptium/containers/issues/458

If you have any ideas or can help test the proposed changes let us know via that issue.

]]>
By: Clayton Walker https://piotrminkowski.com/2023/11/07/slim-docker-images-for-java/#comment-2192 Wed, 08 Nov 2023 03:52:09 +0000 https://piotrminkowski.com/?p=14643#comment-2192 Consider also using distroless as an alternative to alpine, as they provide java base images that you can add a jlinked jre to.

]]>