sh 在CLI上搜索docker hub

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh 在CLI上搜索docker hub相关的知识,希望对你有一定的参考价值。

#!/bin/bash

# http://stackoverflow.com/questions/24481564/how-can-i-find-docker-image-with-specific-tag-in-docker-registry-in-docker-comma

for Repo in $* ; do
    tags=$(curl -s -S "https://registry.hub.docker.com/v2/repositories/library/$Repo/tags/")
    python - <<EOF
import json
tags = [t['name'] for t in json.loads('''$tags''')['results']]
tags.sort()
for tag in tags:
    print "{}:{}".format('$Repo', tag)
EOF
done

以上是关于sh 在CLI上搜索docker hub的主要内容,如果未能解决你的问题,请参考以下文章

Nexus 3.6 OSS Docker Hub代理 - 可以停靠搜索但不能停靠码头

sh 来自https://hub.docker.com/r/webcenter/activemq/

Docker实践:Docker Hub(镜像分发自动化构建)

Docker实践:Docker Hub(镜像分发自动化构建)

Docker实践:配置Docker Hub 加速器(DaoCloud阿里云)

Docker实践:配置Docker Hub 加速器(DaoCloud阿里云)