任何API或Web UI项目来管理Docker私人注册表? [英] Any API or Web UI project to manage a Docker private registry?

查看:100
本文介绍了任何API或Web UI项目来管理Docker私人注册表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法找到如何管理私人注册表中的图片。我可以推或拉一个图像,因为我知道id,但如何获得推送图像的列表?

I can't find how to manage images in a private registry. I can push or pull an image because i know the id but how to get the list of pushed images ?

例如,想要在他的组织的私人注册表下看到可用图像的人。她该怎么办?

Take for example a person who wants to see the available images under the private registry of his organization. How can she do ?

除非我错误,否则我找不到API或Web UI,以发现index.docker.io与公共注册表一样的注册表内容。

Unless I'm mistaken, I can't find API or Web UI to discover the registry content like the index.docker.io do with the public registry.

有没有任何开源项目来管理?

Are there any open source projects to manage this ?

谢谢。

推荐答案

感谢Thomas!

为了允许使用搜索API,您必须启动容器指定环境变量SEARCH_BACKEND的值,如下所示:

To allow the use of the search API, you must start the container by specifying the value of the environment variable SEARCH_BACKEND like this :

docker run -d -e SEARCH_BACKEND=sqlalchemy -p 5000:5000 --name registry samalba/docker-registry

然后我有一个查询结果:

Then i have a result for this query :

GET http://registry_host:5000/v1/search?q=base

Result :
{ 
   "num_results": 1, 
   "query": "base", 
   "results": [{"description": "", "name": "test/base-img"}]
}

要列出所有图片,您可以执行以下操作:

To list all images, you can do this :

GET http://registry_host:5000/v1/search

Result :
{ 
   "num_results": 2, 
   "query": "", 
   "results": [
       {"description": "", "name": "test/base-img"},
       {"description": "", "name": "test/base-test"}]
}

并了解图片的可用版本:

And to know the available versions of an image :

GET http://localhost:5000/v1/repositories/**test/base-img**/tags

Result :
{
  "0.1": "04e073e1efd31f50011dcde9b9f4d3148ecc4da94c0b7ba9abfadef5a8522d13",
  "0.2": "04e073e1efd31f50011dcde9b9f4d3148ecc4da94c0b7ba9abfadef5a8522d13",
  "0.3": "04e073e1efd31f50011dcde9b9f4d3148ecc4da94c0b7ba9abfadef5a8522d13"
}

这篇关于任何API或Web UI项目来管理Docker私人注册表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆