How to search images from private 1.0 registry in docker?

Currently there's no search support for Docker Registry v2.

There was a long-running thread on the topic. The current plan is to support search with an extension in the end, which should be ready by v2.1.

As a workaround, execute the following on the machine where your registry v2 is running:

> docker exec -it <your_registry_container_id> bash
> ls /var/lib/registry/docker/registry/v2/repositories/

The images are in subdirectories corresponding to their namespace, e.g. jwilder/nginx-proxy


Now from docker client you can simply search your private registry directly without using the HTTP APIs or any extra tools:

e.g. searching for centos image:

docker search localhost:5000/centos


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

So I know this is a rapidly changing field but (as of 2015-09-08) I found the following in the Docker Registry HTTP API V2:

Listing Repositories (link)

GET /v2/_catalog

Listing Image Tags (link)

GET /v2/<name>/tags/list

Based on that the following worked for me on a local registry (registry:2 IMAGE ID 1e847b14150e365a95d76a9cc6b71cd67ca89905e3a0400fa44381ecf00890e1 created on 2015-08-25T07:55:17.072):

$ curl -X GET http://localhost:5000/v2/_catalog
{"repositories":["ubuntu"]}
$ curl -X GET http://localhost:5000/v2/ubuntu/tags/list
{"name":"ubuntu","tags":["latest"]}