谢谢托马斯!
要允许使用搜索API,您必须通过指定环境变量SEARCH_BACKEND的值来启动容器,如下所示:
docker run -d -e SEARCH_BACKEND=sqlalchemy -p 5000:5000 --name registry samalba/docker-registry
然后我有此查询的结果:
GET http://registry_host:5000/v1/search?q=baseResult :{ "num_results": 1, "query": "base", "results": [{"description": "", "name": "test/base-img"}]}要列出所有图像,您可以执行以下操作:
GET http://registry_host:5000/v1/searchResult :{ "num_results": 2, "query": "", "results": [ {"description": "", "name": "test/base-img"}, {"description": "", "name": "test/base-test"}]}并了解图像的可用版本:
GET http://localhost:5000/v1/repositoriestagsResult :{ "0.1": "04e073e1efd31f50011dcde9b9f4d3148ecc4da94c0b7ba9abfadef5a8522d13", "0.2": "04e073e1efd31f50011dcde9b9f4d3148ecc4da94c0b7ba9abfadef5a8522d13", "0.3": "04e073e1efd31f50011dcde9b9f4d3148ecc4da94c0b7ba9abfadef5a8522d13"}


