If I specify the following base image, which minor version of Java would be pulled?
FROM adoptopenjdk/openjdk11:alpine-jre
Similarly, which minor version would be pulled if I specify the following:
FROM adoptopenjdk/openjdk11-openj9:alpine-jre
Documentation for above images:
-
CodePudding user response:
With a "floating" tag like this, it will be whichever the most recent version that's been packaged is.
It's important to note that
docker build
anddocker run
will just use a local image if you have one, so if the image you have locally uses Java 11.0.9 and there's a newer one on Docker Hub with 11.0.11, you'll use the slightly older version. There is adocker build --pull
option that doesdocker pull
on everyFROM
line before building, which will make sure you have the most recent base image.Since you can
docker run
the base image directly, it should be straightforward to figure out what's inside of itdocker run --rm adoptopenjdk/openjdk11:alpine-jre \ java -version