简体   繁体   English

关于Docker Hub的一些问题

[英]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.我对使用 Docker 相当陌生,我去了 Docker Hub 到 select 一个基本图像,但我有一些问题。 In particular, I want to use a non-alpine amazoncorretto:latest, and am wondering:特别是,我想使用非高山 amazoncorretto:latest,我想知道:

  • If I use "amazoncorretto:latest" in a Dockerfile, eg:如果我在 Dockerfile 中使用“amazoncorretto:latest”,例如:

    FROM amazoncorretto:latest来自 amazoncorretto:最新

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?例如,我可以在运行的容器上使用“exec”并准确找出正在使用的图像/版本吗? 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".我注意到在 Docker 集线器(例如: https://hub.docker.com/_/amazoncorretto?tab=tags )中,对于每个标签,例如“amazoncorretto:latest”,它显示了 2 张图像,其中一张没有“v8” ”,另一个带有“v8”。 What does that "v8" mean?那个“v8”是什么意思?

  • Also, some tags have "al2" in the tag.此外,一些标签在标签中有“al2”。 What does that "al2" mean? “al2”是什么意思?

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?这实际上不是 Docker 问题:您通常如何判断您使用的是哪个版本的 Correto? It looks as if java -version provides this information, so you can just run that command in a container:看起来java -version提供了这些信息,所以你可以在容器中运行该命令:

$ 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.可以从可用的 Docker 标签中找出其中的一些。 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 .如果您查看latest标签的信息,它显示图像的linux/amd64版本具有摘要1395e022da6d If we look at the list of available tags, we see the same digest for the tag 8u332 .如果我们查看可用标签列表,我们会看到标签8u332的相同摘要。

It's fairly common -- but by no means universal!这是相当普遍的——但绝不是普遍的! -- for the latest tag to be an alternative name for a version-specific tag. -- latest标签是版本特定标签的替代名称。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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