我知道的最简单的方法是编写一个简单的脚本,该脚本使用Docker Registry REST
API并根据需要对结果进行基本操作。
这是Python 3中的一些示例代码,可以在我使用的仓库中执行此操作:
import requestsrepo_tag_url = 'https://hub.docker.com/v2/repositories/streamsets/datacollector/tags'results = requests.get(repo_tag_url).json()['results']for repo in results: print(repo['name'], repo['last_updated'])
以我的示例为例,它返回:
3.0.0.0-SNAPSHOT 2017-10-23T14:43:29.888877Zlatest 2017-10-05T23:05:03.636155Z2.7.2.0 2017-10-05T22:50:53.269831Z2.7.2.0-RC5 2017-10-05T19:34:19.523402Z2.7.2.0-RC4 2017-10-05T02:05:52.522323Z2.7.2.0-RC3 2017-10-04T00:08:02.929502Z2.8.0.0-SNAPSHOT 2017-10-03T21:55:08.042479Z2.7.2.0-RC2 2017-10-03T19:20:56.642686Z2.7.2.0-RC21 2017-09-30T21:42:27.924190Z2.7.2.0-RC1 2017-09-30T17:34:14.409320Z



