docker 查询或获取私有仓库(registry)中的镜像

docker 查询或获取私有仓库(registry)中的镜像,使用

    docker search 192.168.1.8:5000

命令经测试不好使。

解决:

1、获取仓库类的镜像:

[root@shanghai docker]# curl -XGEThttp://192.168.1.8:5000/v2/_catalog

{"repositories":["nginx"]}

 

2、获取某个镜像的标签列表:

[root@shanghai docker]# curl -XGEThttp://192.168.1.8:5000/v2/image_name/tags/list

{"errors":[{"code":"NAME_UNKNOWN","message":"repositoryname not known toregistry","detail":{"name":"image_name"}}]}


[root@shanghai docker]# curl -XGEThttp://192.168.1.8:5000/v2/nginx/tags/list

{"name":"nginx","tags":["latest"]}

[root@shanghai docker]#

参考:

https://stackoverflow.com/questions/23733678/how-to-search-images-from-private-1-0-registry-in-docker

posted @ 2019-05-30 14:12  星朝  阅读(16142)  评论(0编辑  收藏  举报