【发布时间】:2020-04-13 14:23:03
【问题描述】:
我们是否有 API 以编程方式获取下图的图像标签值?
https://access.redhat.com/containers/?tab=tags&get-method=registry-tokens#/registry.access.redhat.com/rhel7
用例: 如果有新的标签版本可用,请获取更高版本。
我正在寻找类似以下的内容:
wget -q https://registry.hub.docker.com/v1/repositories/debian/tags -O - | sed -e 's/[][]//g' -e 's/"//g' -e 's/ //g' | tr '}' '\n' | awk -F: '{print $3}'
以上解决方案来自stackoverflow问题:
https://stackoverflow.com/questions/28320134/how-can-i-list-all-tags-for-a-docker-image-on-a-remote-registry
我做到了
wget https://access.redhat.com/containers/?tab=tags&get-method=registry-tokens#/registry.access.redhat.com/rhel7
不幸的是,它提供了很多无用的冗余数据。
我很感激任何线索。
谢谢
【问题讨论】: