92 字
1 分钟

通过dockerhub的官方API查找官方镜像的历史版本

命令#

Terminal window
curl -L -s "https://registry.hub.docker.com/v2/repositories/library/$1/tags?page_size=1024" | jq '.results[]["name"]' | sed 's/\"//g' | sort -u

用法#

可以将上面的命令写成一个shell脚本,运行脚本来查找。 如:

Terminal window
[root@wordpress-187 /opt/ShellScripts]#./search-tag.sh centos
5
5.11
6
6.10
6.6
6.7
6.8
6.9
7
7.0.1406
7.1.1503
7.2.1511
7.3.1611
7.4.1708
7.5.1804
7.6.1810
7.7.1908
7.8.2003
7.9.2009
8
8.1.1911
8.2.2004
8.3.2011
8.4.2105
centos5
centos5.11
centos6
centos6.10
centos6.6
centos6.7
centos6.8
centos6.9
centos7
centos7.0.1406
centos7.1.1503
centos7.2.1511
centos7.3.1611
centos7.4.1708
centos7.5.1804
centos7.6.1810
centos7.7.1908
centos7.8.2003
centos7.9.2009
centos8
centos8.1.1911
centos8.2.2004
centos8.3.2011
centos8.4.2105
latest

支持与分享

如果这篇文章对你有帮助,欢迎分享给更多人或赞助支持!

赞助
通过dockerhub的官方API查找官方镜像的历史版本
https://white-festa.net/posts/docker-search/
作者
常世常暗
发布于
2023-07-01
许可协议
CC BY-NC-SA 4.0
最后更新于 2023-07-01,距今已过 906 天

部分内容可能已过时

评论区

目录