How to search images from private 1.0 registry in

2019-01-21 00:44发布

I made a private registry,curl xx.xx.xx.xx:5000 is ok. I push an image into docker private registry by doing: docker push xx.xx.xx.xx:5000/centos
it return:
http://xx.xx.xx.xx:5000/v1/repositories/centos/tags/latest

the question is how to get all images from registry web or command whatever. I cant find any information from docker registry api. any one helps ? :)

10条回答
家丑人穷心不美
2楼-- · 2019-01-21 01:09

As of v 0.7.0 of the private registry you can do:

$ curl -X GET http://localhost:5000/v1/search?q=postgresql

and you will get a json payload:

{"num_results": 1, "query": "postgresql", "results": [{"description": "", "name": "library/postgresql"}]}

to give more background here is how I started my registry:

docker run \
        -e SETTINGS_FLAVOR=local \
        -e STORAGE_PATH=/registry \
        -e SEARCH_BACKEND=sqlalchemy \
        -e LOGLEVEL=DEBUG \
        -p 5000:5000 \
        registry
查看更多
狗以群分
3楼-- · 2019-01-21 01:10

List all images

docker search <registry_host>:<registry_port>/

List images like 'vcs'

docker search <registry_host>:<registry_port>/vcs
查看更多
何必那么认真
4楼-- · 2019-01-21 01:11

I installed the atc-/docker-registry-web project that gives me UI and search for my private registry. https://github.com/atc-/docker-registry-web

It is dockerised and you can just run it by

docker run -p 8080:8080 -e REG1=http://registry_host.name:5000/v1/ atcol/docker-registry-ui

and review contents by browsing to registry_ui_host.name:8080

查看更多
别忘想泡老子
5楼-- · 2019-01-21 01:17

Was able to get everything in my private registry back by searching just for 'library':

docker search [my.registry.host]:[port]/library

Returns (e.g.):

NAME                    DESCRIPTION   STARS     OFFICIAL   AUTOMATED
library/custom-image                  0                    
library/another-image                 0                    
library/hello-world                   0
查看更多
登录 后发表回答