简体   繁体   中英

Some questions about Docker Hub

I am fairly new to using Docker and I went to Docker Hub to select a base image, but I have some questions. In particular, I want to use a non-alpine amazoncorretto:latest, and am wondering:

  • If I use "amazoncorretto:latest" in a Dockerfile, eg:

    FROM amazoncorretto:latest

is there a way to find out what specific version actually is used at runtime? For example can I use "exec" on the running container and find out exactly which image/version is being used? I am asking because where I work, we have to get the specific version pre-approved.

  • I noticed that in Docker hub (eg: https://hub.docker.com/_/amazoncorretto?tab=tags ) for each tag, eg, the "amazoncorretto:latest", it shows 2 images, one without a "v8" and the other with a "v8". What does that "v8" mean?

  • Also, some tags have "al2" in the tag. What does that "al2" mean?

Thanks, and sorry for all the really newbie questions, and thanks in advance!

Jim

This isn't really a Docker question: how would you normally tell what version of Correto you're using? It looks as if java -version provides this information, so you can just run that command in a container:

$ docker run --rm docker.io/amazoncorretto:latest java -version
openjdk version "1.8.0_332"
OpenJDK Runtime Environment Corretto-8.332.08.1 (build 1.8.0_332-b08)
OpenJDK 64-Bit Server VM Corretto-8.332.08.1 (build 25.332-b08, mixed mode)

It is possible to figure out some of this from the available Docker tags. If you look at the information for the latest tag, it shows, it shows that the linux/amd64 version of the image has digest 1395e022da6d . If we look at the list of available tags, we see the same digest for the tag 8u332 .

It's fairly common -- but by no means universal! -- for the latest tag to be an alternative name for a version-specific tag.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM