What is the difference between the following Docker images?
openjdk:16-slim
openjdk:16-jdk-slim
openjdk:16-ea-slim
Which is smaller in size and can be used in a Spring Boot project?
What is the difference between the following Docker images?
openjdk:16-slim
openjdk:16-jdk-slim
openjdk:16-ea-slim
Which is smaller in size and can be used in a Spring Boot project?
The difference is in the Java version used and hence in the compressed size (links below):
198.93 MB
uses 16.0.1
198.93 MB
uses 16.0.1
198.82 MB
uses 16-ea+34
(early-access)You correctly noticed there is no difference between openjdk:16-slim
and openjdk:16-jdk-slim
aside from hashes. I assume there are two identical images in order to respect the new naming conventions (my guess).
If you refer to the openjdk DockerHub description | Image Variants, you might find the following:
The openjdk images come in many flavors, each designed for a specific use case.
openjdk:<version>
This is the defacto image. If you are unsure about what your needs are, you probably want to use this one. It is designed to be used both as a throw away container (mount your source code and start the container to start your app), as well as the base to build other images off of.
Important: If you decide to use Spring Boot with Java 16, you need to use currently the newest version (as of May, 2021) of Spring Boot 2.5.0
or newer. Read more at Spring Boot 2.5 is now GA.