0

We are upgrading our microservices in docker to use Java 18 and previously we used the base image openjdk:11.0.7-jre-slim. What is the corresponding image for Java 18?

There doesn't seem to be a openjdk:18-jre-slim?

curious
  • 231
  • 3
  • 12
  • "JRE is no longer a target of the OpenJDK project. "JDK 12+ has no official JRE build." You could probably use either "eclipse-temurin:18-jre" or "eclipse-temurin:18-jre-alpine " instead. – Martin Niederl Dec 27 '22 at 15:33
  • Please see the deprecation notice on [the Docker Hub `openjdk` image](https://hub.docker.com/_/openjdk), but all of the answers to the linked question about Java 17 also apply for Java 18. – David Maze Dec 27 '22 at 16:33

1 Answers1

1

Why not use one of the openjdk 18 liberica images? They produce the smallest containers and they are TCK-verified for Java SE specifications. You could find more at their dockerhub page.

P.S. One of my other answers and that question itself could also come in handy. That was about JDK 11 but it has some details that are still relevant if you want it to be as lightweight as possible.

Dmitry Khamitov
  • 3,061
  • 13
  • 21