OpenJDK Java 17 docker image

Viewed 29210

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

There doesn't seem to be a openjdk:17-jre-slim? In fact there dont seem to be any recent jre images - just jdks. The 11-jre-slim image seems to be arount 75MB - is there a suitable similarly sized Java 17 image?

We have also used alpine images in the past too.

4 Answers

Oracle image is freely available from Java-17 openjdk:17-oracle

Dockerfile:

FROM openjdk:17-oracle

openjdk:17-jdk-slim also creates lightweight image

Dockerfile:

FROM openjdk:17-jdk-slim

An update on this - looking again at the Eclipse Adoptium issue mentioned above (https://github.com/adoptium/temurin-build/issues/2683) the more recent comments indicate they have now started producing JRE images.

We have switched to using eclipse-temurin:17-jre-focal. There is also a (slightly larger) 17-jre-centos7 and a smaller 17-jre-alpine, but we now need some libraries that aren't in alpine.

Related