查看docker镜像所有tags

有时候我们在pull 镜像的时候想指定一个tag,而不是最新tag,可以通过这个官方接口直接查询所有的tags

curl  https://registry.hub.docker.com/v1/repositories/mysql/tags | python3 -m json.tool | more

可以保存为 shell 脚本, 方便使用

#!/bin/bash \n
echo '正在搜索镜像 '$1' 的tags ...' \n
curl  https://registry.hub.docker.com/v1/repositories/$1/tags | python3 -m json.tool | more

参考 博问: https://q.cnblogs.com/q/130431/

posted @ 2020-11-29 21:41  小鸣Cycling  阅读(2754)  评论(0编辑  收藏  举报