查看docker镜像tag为latest的具体版本号

428 阅读1分钟

命令格式:

docker image inspect (docker image名称):latest | grep -i version

使用演示:

[root@nfs ~]# docker image inspect jenkins/jenkins:latest |grep -i version       
        "DockerVersion": "",     
                "JENKINS_VERSION=2.452",
                "org.opencontainers.image.version": "2.452" 

可以看到JENKINS_VERSION值为 2.452,则 jenkins 的镜像版本为 2.452。